classes/Controllers/Base.php
protected function makeIndexQuery()
    {
        // Open up the query. We can assume that Model has an ordered() function
        // because it's defined on Decoy's Base_Model
        $query = $this->parent ?
            $this->parentRelation()->ordered() :
            call_user_func([$this->model, 'ordered']);

        // Allow trashed records
        if ($this->withTrashed()) {
            $query->withTrashed();
        }

        // Apply search
        $search = new Search();
        $query = $search->apply($query, $this->search());
        return $query;
    }
protected function makeIndexQuery()
    {
        // Open up the query. We can assume that Model has an ordered() function
        // because it's defined on Decoy's Base_Model
        $query = $this->parent ?
            $this->parentRelation()->ordered() :
            call_user_func([$this->model, 'ordered']);

        // Allow trashed records
        if ($this->withTrashed()) {
            $query->withTrashed();
        }

        // Apply search
        $search = new Search();
        $query = $search->apply($query, $this->search());
        return $query;
    }
protected function makeIndexQuery ( ) { // Open up the query. We can assume that Model has an ordered() function // because it's defined on Decoy's Base_Model $ query = $ this -> parent ? $ this -> parentRelation ( ) -> ordered ( ) : call_user_func ( [ $ this -> model , 'ordered' ] ) ; // Allow trashed records if ( $ this -> withTrashed ( ) ) { $ query -> withTrashed ( ) ; } // Apply search $ search = new Search ( ) ; $ query = $ search -> apply ( $ query , $ this -> search ( ) ) ; return $ query ; }
Make the index query, including applying a search

@return \Illuminate\Database\Eloquent\Builder
Make the index query including applying a search