Form button with relationship
How to have a button(visible if the record has the relationship) that opens the edit form of that relationship.
I tried like
How to make the relationship? Or is there a better way to do this?
1 Reply
Wouldn’t all records, have the relationship?
And for the relationship you would attach/sync etc in the ->action() modifier of the action.
$livewire->getRecord()->comment()->attach([…])
for example.