src/Api/Serializer/AbstractSerializer.php
protected function getCustomRelationship($model, $name)
    {
        $relationship = static::$dispatcher->until(
            new GetApiRelationship($this, $name, $model)
        );

        if ($relationship && ! ($relationship instanceof Relationship)) {
            throw new LogicException(
                'GetApiRelationship handler must return an instance of '.Relationship::class
            );
        }

        return $relationship;
    }
protected function getCustomRelationship($model, $name)
    {
        $relationship = static::$dispatcher->until(
            new GetApiRelationship($this, $name, $model)
        );

        if ($relationship && ! ($relationship instanceof Relationship)) {
            throw new LogicException(
                'GetApiRelationship handler must return an instance of '.Relationship::class
            );
        }

        return $relationship;
    }
protected function getCustomRelationship ( $ model , $ name ) { $ relationship = static :: $ dispatcher -> until ( new GetApiRelationship ( $ this , $ name , $ model ) ) ; if ( $ relationship && ! ( $ relationship instanceof Relationship ) ) { throw new LogicException ( 'GetApiRelationship handler must return an instance of ' . Relationship :: class ) ; } return $ relationship ; }
Get a custom relationship.

@param mixed $model
@param string $name
@return Relationship|null
Get a custom relationship .