Open
Description
eg. pivot timestamps/data
ToMany::make('roles')
// meta on the relationship object
// $context->model is still the parent model
->meta([
Meta::make('foo')->get('bar'),
])
// meta on linkage resource identifier objects
// $context->model is the related model
->linkageMeta([
Meta::make('assignedAt')->get(fn($role) => $role->pivot->created_at),
]);