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

        return $query;
    }