Adding relationship manager to livewire
Hello all,
Is there a painless way to add a Relationship Manager to a custom livewire component?
Use cases:
- A edit profile page with an address (belongstomany) relationship - user can attach and detach addresses
Thanks!
Solution:Jump to solution
Relation Managers are Livewire components. You could add them to the view file.
4 Replies
Solution
Relation Managers are Livewire components. You could add them to the view file.
Thanks @Dennis Koch, I was wondering if there was an easier way, but I went with your way! Thanks so much!
For those wondering, here's the solution:
In your view:
Then in your livewire component, you just need to define public $activeRelationManager (object), $relationManagers (array) and getRecord()
Not really. You cannot embed them in Forms, because they contain forms themselves. So the only solution is via the view
You guys made us lazy. We expect an easy fix for everything, because filaments makes us cut some many corners. Thank you for the support! ππ»