Open SychO9 opened 4 months ago
We have a use case where we need to enable linkage for a ToMany relation, but only when the Show endpoint is related to the resource itself and not another (another can be when inclusion is in effect instead).
So we do something along the lines of
ToMany::make('posts') ->withLinkage(function (Context $context) { return $context->showing(self::class); })
We have a use case where we need to enable linkage for a ToMany relation, but only when the Show endpoint is related to the resource itself and not another (another can be when inclusion is in effect instead).
So we do something along the lines of