src/ModelFilter.php
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;
        });
    }
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;
        });
    }
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 ; } ) ; }
Filters by a relationship that isn't joined by using that relation's ModelFilter.

@param $related
Filters by a relationship that isn t joined by using that relation s ModelFilter .