You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue with the Twill Browser component not loading existing relationships when editing a record. The browser field appears correctly, but it's always empty even when there are existing relationships in the database.
My Setup:
I have a User model that has a many-to-many relationship with Animal through a pivot table user_animal_teams
The pivot table has additional fields such as team_code, is_primary_owner, position, etc.
The relationship is defined correctly and works in other contexts outside the Twill admin
What I've Tried:
Configured the repository with protected $browsers = ['animals'];
When I log $object->animals, I can see the related animals exist. But when the form renders, the browser field is always empty.
How can I get the Browser component to properly load and display the existing relationships?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having an issue with the Twill Browser component not loading existing relationships when editing a record. The browser field appears correctly, but it's always empty even when there are existing relationships in the database.
My Setup:
What I've Tried:
Also try this (in repository)
When I log $object->animals, I can see the related animals exist. But when the form renders, the browser field is always empty.
How can I get the Browser component to properly load and display the existing relationships?
Beta Was this translation helpful? Give feedback.
All reactions