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;
}