public function filterQuery(QueryBuilder &$query, &$selects = null)
    {
        $model = $this->config->getDataModel();

        //if this field has a min/max range, set it
        if ($this->getOption('min_max')) {
            if ($minValue = $this->getOption('min_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '>=', $minValue);
            }

            if ($maxValue = $this->getOption('max_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '<=', $maxValue);
            }
        }
    }
public function filterQuery(QueryBuilder &$query, &$selects = null)
    {
        $model = $this->config->getDataModel();

        //if this field has a min/max range, set it
        if ($this->getOption('min_max')) {
            if ($minValue = $this->getOption('min_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '>=', $minValue);
            }

            if ($maxValue = $this->getOption('max_value')) {
                $query->where($model->getTable().'.'.$this->getOption('field_name'), '<=', $maxValue);
            }
        }
    }
public function filterQuery ( QueryBuilder & $ query , & $ selects = null ) { $ model = $ this -> config -> getDataModel ( ) ; //if this field has a min/max range, set it if ( $ this -> getOption ( 'min_max' ) ) { if ( $ minValue = $ this -> getOption ( 'min_value' ) ) { $ query -> where ( $ model -> getTable ( ) . '.' . $ this -> getOption ( 'field_name' ) , '>=' , $ minValue ) ; } if ( $ maxValue = $ this -> getOption ( 'max_value' ) ) { $ query -> where ( $ model -> getTable ( ) . '.' . $ this -> getOption ( 'field_name' ) , '<=' , $ maxValue ) ; } } }
Filters a query object given.

@param \Illuminate\Database\Query\Builder $query
@param array                              $selects
Filters a query object given .