public function buildQuery(iterable $filter, array $opts = [])
    {
        return Pipeline::with($this->stages)
            ->flatten()
            ->reduce(function($data, callable $step) use ($opts) {
                return $step($data, $opts);
            }, $filter);
    }
public function buildQuery(iterable $filter, array $opts = [])
    {
        return Pipeline::with($this->stages)
            ->flatten()
            ->reduce(function($data, callable $step) use ($opts) {
                return $step($data, $opts);
            }, $filter);
    }
public function buildQuery ( iterable $ filter , array $ opts = [ ] ) { return Pipeline :: with ( $ this -> stages ) -> flatten ( ) -> reduce ( function ( $ data , callable $ step ) use ( $ opts ) { return $ step ( $ data , $ opts ) ; } , $ filter ) ; }
Create the query from a filter

@param iterable $filter
@param array    $opts
@return mixed
Create the query from a filter