src/QueryFilters.php
public function applyToQuery(Builder $query)
    {
        $this->query = $query;

        foreach ($this->request->all() as $filter => $value) {
            $method = Str::camel($filter);

            if ($this->filterCanBeApplied($method, $value)) {
                call_user_func([$this, $method], $value);
            }
        }

        return $query;
    }
public function applyToQuery(Builder $query)
    {
        $this->query = $query;

        foreach ($this->request->all() as $filter => $value) {
            $method = Str::camel($filter);

            if ($this->filterCanBeApplied($method, $value)) {
                call_user_func([$this, $method], $value);
            }
        }

        return $query;
    }
public function applyToQuery ( Builder $ query ) { $ this -> query = $ query ; foreach ( $ this -> request -> all ( ) as $ filter => $ value ) { $ method = Str :: camel ( $ filter ) ; if ( $ this -> filterCanBeApplied ( $ method , $ value ) ) { call_user_func ( [ $ this , $ method ] , $ value ) ; } } return $ query ; }
Apply all the filters to the given query.

@param    Illuminate\Database\Eloquent\Builder    $query
@return    Illuminate\Database\Eloquent\Builder
Apply all the filters to the given query .