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