protected function applyNullLastQuery($query, $column)
    {
        if ($this->databaseSupportsIf($query)) {
            $query = $query->orderBy(DB::raw("IF(`{$column}` IS NULL,1,0)"));
        }

        return $query;
    }
protected function applyNullLastQuery($query, $column)
    {
        if ($this->databaseSupportsIf($query)) {
            $query = $query->orderBy(DB::raw("IF(`{$column}` IS NULL,1,0)"));
        }

        return $query;
    }
protected function applyNullLastQuery ( $ query , $ column ) { if ( $ this -> databaseSupportsIf ( $ query ) ) { $ query = $ query -> orderBy ( DB :: raw ( "IF(`{$column}` IS NULL,1,0)" ) ) ; } return $ query ; }
Applies logic to query builder to sort null or empty fields last.

@param Builder $query
@param string $column
@return Builder
Applies logic to query builder to sort null or empty fields last .