beachbound
beachbound
FFilament
Created by beachbound on 12/19/2023 in #❓┊help
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?
4 replies