LMongo\Eloquent\Relations\Relation::__call PHP Method

__call() public method

Handle dynamic method calls to the relationship.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
return mixed
    public function __call($method, $parameters)
    {
        $result = call_user_func_array(array($this->query, $method), $parameters);
        if ($result === $this->query) {
            return $this;
        }
        return $result;
    }