src/Mappable.php
protected function mappedHasQuery(Builder $query, $method, ArgumentBag $args, $target, $column)
    {
        $boolean = $this->getMappedBoolean($args);

        $operator = $this->getMappedOperator($method, $args);

        $args->set('column', $column);

        return $query
            ->has($target, $operator, 1, $boolean, $this->getMappedWhereConstraint($method, $args))
            ->with($target);
    }
protected function mappedHasQuery(Builder $query, $method, ArgumentBag $args, $target, $column)
    {
        $boolean = $this->getMappedBoolean($args);

        $operator = $this->getMappedOperator($method, $args);

        $args->set('column', $column);

        return $query
            ->has($target, $operator, 1, $boolean, $this->getMappedWhereConstraint($method, $args))
            ->with($target);
    }
protected function mappedHasQuery ( Builder $ query , $ method , ArgumentBag $ args , $ target , $ column ) { $ boolean = $ this -> getMappedBoolean ( $ args ) ; $ operator = $ this -> getMappedOperator ( $ method , $ args ) ; $ args -> set ( 'column' , $ column ) ; return $ query -> has ( $ target , $ operator , 1 , $ boolean , $ this -> getMappedWhereConstraint ( $ method , $ args ) ) -> with ( $ target ) ; }
Add whereHas subquery on the mapped attribute relation.

@param  \Sofa\Eloquence\Builder $query
@param  string $method
@param  \Sofa\Hookable\Contracts\ArgumentBag $args
@param  string $target
@param  string $column
@return \Sofa\Eloquence\Builder
Add whereHas subquery on the mapped attribute relation .