© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
beachbound

Listing with Pivot Attributes when Pivot attribute is an Accessor

I have 3 tables, reports, users and report_user. report_user is the pivot table and it has an attribute named "permission". I created a model for report_user in order to define an Accessor for "permission" as its currently stored as a single character string and when I output it I want it to read the full word of the permission. The permission pivot attribute (which is the single character string) shows up fine in the relationship manager table as a column by simply accessing with "permission", when I try to use the accessor "display_permission" it doesn't show up. I have setup my belongsToMany relationships fine for both sides of the relationship and its using the ReportUser class so it should have the accessor in scope. Is it possible to use an accessor defined on a Pivot Table model in Filament 3?
Solution
I resolved this by prefixing the attribute with "pivot." so in this instance "pivot.permission" returned the value as defined by the Pivot Model Accessor where "permission" only returned the single character string.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Creating with pivot attributes
FilamentFFilament / ❓┊help
2y ago
Attach Pivot attributes
FilamentFFilament / ❓┊help
2y ago
Save relationship with pivot attributes/columns
FilamentFFilament / ❓┊help
3y ago
Sptie Translatable Pivot Attributes
FilamentFFilament / ❓┊help
2y ago