src/BaseRepositoryEloquent.php
protected function queryFilters($query, $filters = [])
    {
        $filters = $filters ?: $this->filters;

        foreach ($filters as $key => $filter) {
            foreach ($filter as $operator => $values) {
                $values = is_array($values) ? $values : [$values];

                $operator = is_numeric($operator) ? '=' : $operator;

                if ($operator == '=') {
                    $query->whereIn($key, $values);
                } elseif ($operator == '!=') {
                    $query->whereNotIn($key, $values);
                } elseif ($operator == 'null') {
                    $query->whereNull($key);
                } elseif ($operator == 'not_null') {
                    $query->whereNotNull($key);
                } else {
                    $query->where($key, $operator, head($values));
                }
            }
        }

        return $query;
    }
protected function queryFilters($query, $filters = [])
    {
        $filters = $filters ?: $this->filters;

        foreach ($filters as $key => $filter) {
            foreach ($filter as $operator => $values) {
                $values = is_array($values) ? $values : [$values];

                $operator = is_numeric($operator) ? '=' : $operator;

                if ($operator == '=') {
                    $query->whereIn($key, $values);
                } elseif ($operator == '!=') {
                    $query->whereNotIn($key, $values);
                } elseif ($operator == 'null') {
                    $query->whereNull($key);
                } elseif ($operator == 'not_null') {
                    $query->whereNotNull($key);
                } else {
                    $query->where($key, $operator, head($values));
                }
            }
        }

        return $query;
    }
protected function queryFilters ( $ query , $ filters = [ ] ) { $ filters = $ filters ? : $ this -> filters ; foreach ( $ filters as $ key => $ filter ) { foreach ( $ filter as $ operator => $ values ) { $ values = is_array ( $ values ) ? $ values : [ $ values ] ; $ operator = is_numeric ( $ operator ) ? '=' : $ operator ; if ( $ operator == '=' ) { $ query -> whereIn ( $ key , $ values ) ; } elseif ( $ operator == '!=' ) { $ query -> whereNotIn ( $ key , $ values ) ; } elseif ( $ operator == 'null' ) { $ query -> whereNull ( $ key ) ; } elseif ( $ operator == 'not_null' ) { $ query -> whereNotNull ( $ key ) ; } else { $ query -> where ( $ key , $ operator , head ( $ values ) ) ; } } } return $ query ; }
Query filters.

@param  \Illuminate\Database\Eloquent\Builder $query
@return \Illuminate\Database\Eloquent\Builder
Query filters .