src/Mappable.php
protected function mappedQuery(Builder $query, $method, ArgumentBag $args)
    {
        $mapping = $this->getMappingForAttribute($args->get('column'));

        if ($this->relationMapping($mapping)) {
            return $this->mappedRelationQuery($query, $method, $args, $mapping);
        }

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

        return $query->callParent($method, $args->all());
    }
protected function mappedQuery(Builder $query, $method, ArgumentBag $args)
    {
        $mapping = $this->getMappingForAttribute($args->get('column'));

        if ($this->relationMapping($mapping)) {
            return $this->mappedRelationQuery($query, $method, $args, $mapping);
        }

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

        return $query->callParent($method, $args->all());
    }
protected function mappedQuery ( Builder $ query , $ method , ArgumentBag $ args ) { $ mapping = $ this -> getMappingForAttribute ( $ args -> get ( 'column' ) ) ; if ( $ this -> relationMapping ( $ mapping ) ) { return $ this -> mappedRelationQuery ( $ query , $ method , $ args , $ mapping ) ; } $ args -> set ( 'column' , $ mapping ) ; return $ query -> callParent ( $ method , $ args -> all ( ) ) ; }
Custom query handler for querying mapped attributes.

@param  \Sofa\Eloquence\Builder $query
@param  string $method
@param  \Sofa\Hookable\Contracts\ArgumentBag $args
@return mixed
Custom query handler for querying mapped attributes .