public function setFilters($filters, QueryBuilder &$query, QueryBuilder &$countQuery, &$selects)
    {
        //then we set the filters
        if ($filters && is_array($filters)) {
            foreach ($filters as $filter) {
                //get the field object
                $fieldObject = $this->fieldFactory->findFilter($filter['field_name']);

                //set the filter on the object
                $fieldObject->setFilter($filter);

                //filter the query objects, only pass in the selects the first time so they aren't added twice
                $fieldObject->filterQuery($query, $selects);
                $fieldObject->filterQuery($countQuery);
            }
        }
    }
public function setFilters($filters, QueryBuilder &$query, QueryBuilder &$countQuery, &$selects)
    {
        //then we set the filters
        if ($filters && is_array($filters)) {
            foreach ($filters as $filter) {
                //get the field object
                $fieldObject = $this->fieldFactory->findFilter($filter['field_name']);

                //set the filter on the object
                $fieldObject->setFilter($filter);

                //filter the query objects, only pass in the selects the first time so they aren't added twice
                $fieldObject->filterQuery($query, $selects);
                $fieldObject->filterQuery($countQuery);
            }
        }
    }
public function setFilters ( $ filters , QueryBuilder & $ query , QueryBuilder & $ countQuery , & $ selects ) { //then we set the filters if ( $ filters && is_array ( $ filters ) ) { foreach ( $ filters as $ filter ) { //get the field object $ fieldObject = $ this -> fieldFactory -> findFilter ( $ filter [ 'field_name' ] ) ; //set the filter on the object $ fieldObject -> setFilter ( $ filter ) ; //filter the query objects, only pass in the selects the first time so they aren't added twice $ fieldObject -> filterQuery ( $ query , $ selects ) ; $ fieldObject -> filterQuery ( $ countQuery ) ; } } }
Sets the query filters when getting the rows.

@param mixed                              $filters
@param \Illuminate\Database\Query\Builder $query
@param \Illuminate\Database\Query\Builder $countQuery
@param array                              $selects
Sets the query filters when getting the rows .