How do you check "if not null" with Eloquent?
If someone like me want to do it with query builder in Laravel 5.2.23 it can be done like ->
$searchResultQuery = Users::query(); $searchResultQuery->where('status_message', '<>', '', 'and'); // is not null $searchResultQuery->where('is_deleted', 'IS NULL', null, 'and'); // is null
Or with scope in model :
public function scopeNotNullOnly($query){ return $query->where('status_message', '<>', '');}