F
Filamentβ€’13mo ago
Travis

Why "promote" pivot columns when building a table for an Eloquent relationship...?

Please refer to this documentation: https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component#automatically-generating-table-columns It says that "all pivot columns [can be used] as if they were normal columns on your table, as long as they are listed in the withPivot() method of the relationship and inverse relationship definition." Why is this the case...? I have a BelongsToMany relationship that I would like to use in the way that the documentation describes, but my related model's attributes have the pivot columns mixed in with them. This seems very odd and I worry about "clashing" fields. Can someone please help me understand why this is designed to work this way...? πŸ€”
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server