Plank\Mediable\Mediable::newMatchAllQuery PHP Метод

newMatchAllQuery() защищенный Метод

Generate a query builder for.
protected newMatchAllQuery ( array | string $tags = [] ) : [type]
$tags array | string [description]
Результат [type]
    protected function newMatchAllQuery($tags = [])
    {
        $tags = (array) $tags;
        $grammar = $this->media()->getConnection()->getQueryGrammar();
        return $this->media()->newPivotStatement()->where($this->media()->getMorphType(), $this->media()->getMorphClass())->whereIn('tag', $tags)->groupBy($this->media()->getOtherKey())->havingRaw('count(' . $grammar->wrap($this->media()->getOtherKey()) . ') = ' . count($tags));
    }