Skip to content

Relationship meta #28

Open
Open
@tobyzerner

Description

@tobyzerner

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),
    ]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions