src/Mappable.php
protected function mappedRelationQuery($query, $method, ArgumentBag $args, $mapping)
    {
        list($target, $column) = $this->parseMappedColumn($mapping);

        if (in_array($method, ['pluck', 'value', 'aggregate', 'orderBy', 'lists'])) {
            return $this->mappedJoinQuery($query, $method, $args, $target, $column);
        }

        return $this->mappedHasQuery($query, $method, $args, $target, $column);
    }
protected function mappedRelationQuery($query, $method, ArgumentBag $args, $mapping)
    {
        list($target, $column) = $this->parseMappedColumn($mapping);

        if (in_array($method, ['pluck', 'value', 'aggregate', 'orderBy', 'lists'])) {
            return $this->mappedJoinQuery($query, $method, $args, $target, $column);
        }

        return $this->mappedHasQuery($query, $method, $args, $target, $column);
    }
protected function mappedRelationQuery ( $ query , $ method , ArgumentBag $ args , $ mapping ) { list ( $ target , $ column ) = $ this -> parseMappedColumn ( $ mapping ) ; if ( in_array ( $ method , [ 'pluck' , 'value' , 'aggregate' , 'orderBy' , 'lists' ] ) ) { return $ this -> mappedJoinQuery ( $ query , $ method , $ args , $ target , $ column ) ; } return $ this -> mappedHasQuery ( $ query , $ method , $ args , $ target , $ column ) ; }
Handle querying relational mappings.

@param  \Sofa\Eloquence\Builder $query
@param  string $method
@param  \Sofa\Hookable\Contracts\ArgumentBag $args
@param  string $mapping
@return mixed
Handle querying relational mappings .