F
Filament15mo ago
Crylar

How can I access pivot relationship in repeater?

I have a belongsToMany relationship but for some reason the pivot is lost. I have fields with same names in both pivot and ref table. I have tried to use loadStateFromRelationshipsUsing instead of relationship but then I get wrong $record model in Repeater schema... please advice.
4 Replies
Dan Harrin
Dan Harrin15mo ago
create a pivot model. create a hasmany relationship to the pivot. use that relationship for the repeater
Crylar
Crylar15mo ago
In Laravel there is a pivot relationship loaded but it's lost, so having a pivot hasMany is the only way?
Dan Harrin
Dan Harrin15mo ago
yes
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View