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 Harrin2y ago
create a pivot model. create a hasmany relationship to the pivot. use that relationship for the repeater
Crylar
CrylarOP2y 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 Harrin2y ago
yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?