Refresh parent on relationship manager update
Is there an easy way to refresh the parent model's data whenever something in the relationship manager happens? e.g. I have an "Order" model with "LineItems" and i need to update the Order Total when I delete or change a line item
2 Replies
Something like this should work
$this->dispatch('$refresh')->to(YourPage::class)
Thank you I'll give this a shot. Did I miss this in the docs somewhere?
I suppose this is a Livewire feature
Unsure if I did something wrong, but this didn't work.
In any case, I added the
listeners
property to my page to $refresh
on an event, dispatched that event and that seems to work