Multiple RelationManager's on custom ManageRelatedRecords page
Hello everyone!
I’m using Spatie Media Library with Filament and want to create a dedicated page to manage product media. My Product model has registered collections: Images and Downloads, but each model can also have its own custom collections.
I attempted to create a MediaManageRelatedRecords page with multiple relation managers—one for each media collection. While I managed to get it working, I encountered an issue: whenever I click on any action in the RelationManager table, I receive an error stating "Unable to find component: [...]".
ProductResource class:
ManageProductImages page class:
1 Reply
ManageMediasRelatedRecords page class
The idea is to use generic class that can be used in multiple places across application to handle record media:
And finally this is my MediaRelationManager class that handles media for each collection: