EloquentFilter\ModelFilter::filterUnjoinedRelation PHP Метод

filterUnjoinedRelation() публичный Метод

Filters by a relationship that isn't joined by using that relation's ModelFilter.
public filterUnjoinedRelation ( $related )
$related
    public function filterUnjoinedRelation($related)
    {
        $this->query->whereHas($related, function ($q) use($related) {
            $this->callRelatedLocalSetup($related, $q);
            // If we defined it locally then we're running the closure on the related model here right.
            foreach ($this->getLocalRelation($related) as $closure) {
                // Run in context of the related model locally
                $closure($q);
            }
            if (count($filterableRelated = $this->getRelatedFilterInput($related)) > 0) {
                $q->filter($filterableRelated);
            }
            return $q;
        });
    }