Issue displaying & editing pivot field (role) in multi-tenant UserResource
Hi, I’m working on a multi-tenant Laravel Filament app with companies and users in a many-to-many relationship. The pivot table is company_user and contains a role field.
The problems I’m facing: 1. In the table, role does not display. 2. When creating a user, Filament inserts data into the pivot table but ignores the value from the role select — it always uses the DB default (member). 3. When editing a user, the form loads name and email, but does not load the current role from the pivot table.
How can I correctly display, load, and save a pivot field (role) in this UserResource with multi-tenancy enabled?