Nested resource breadcrumbs find custom relation pages

Nested resource breadcrumbs find custom relation pages

  • navigation
  • breadcrumb

When resolving the index URL for a nested resource breadcrumb, Filament now checks an explicit parent page key, the relationship name, or the first matching ManageRelatedRecords page, before falling back to parent edit/view.

Registering a relation page with a custom key

E.g.: Post -> Comments

public static function getParentResourceRegistration(): ?ParentResourceRegistration
{
    return PostResource::asParent()
        ->relationship('comments')
        ->page('manageComments')
        ->inverseRelationship('commentable’);
}
  • BEFORE: Only looks for a parent page keyed exactly like the relationship name
  • NOW: Use a relation manager page registered as manageComments. Editing a comment used to breadcrumb back to the post edit page; now "Comments" correctly links to the manage-comments relation page.
All Filament Up To Date tips