-
Notifications
You must be signed in to change notification settings - Fork 20
Description
π Feature Request: Support for displaying related model custom fields in relation managers
Hello π
Iβm using Relaticle Custom Fields with Filament, and I have a scenario where Iβd like to display custom fields of a related model inside a relation manager table.
Example use case
I have two models:
Registration β belongs to a Member
Member β has custom fields defined with Relaticle
In my RegistrationRelationManager, Iβd like to display the custom fields of the related Member directly in the table.
Something like:
CustomFields::table()
->forModel(Member::class)
->forRelation('member')
->columns();Currently, Iβve written a custom helper to make this work β it displays the fields correctly β but it also requires custom logic to make filters and sorting work, since the CustomFields columns expect the main record to be a HasCustomFields model.
π‘ Feature idea
Would it be possible to extend the forModel() builder (or add a new method, e.g. forRelation('member')) so that the generated columns automatically:
Resolve the related model ($record->member) internally
Handle filters/sorting on related custom fields out of the box
This would make relation-based custom field displays much cleaner and more consistent with the rest of the API.
β€οΈ Thank you
Thanks for the great work on this package β itβs super powerful already!
This feature would make it even easier to integrate custom fields in more complex Filament setups.