Refreshing parent page after an action in a relation table

I have an action in a relation table that may update the parent record. I want to refresh the parent page's actions so those changes are reflected. How can i do that?
2 Replies
LeandroFerreira
//action
->action(function ($livewire) {
$livewire->emit('some-event');
})

//EditPage
protected $listeners = ['some-event' => '$refresh'];
//action
->action(function ($livewire) {
$livewire->emit('some-event');
})

//EditPage
protected $listeners = ['some-event' => '$refresh'];
? https://laravel-livewire.com/docs/2.x/actions#magic-actions https://laravel-livewire.com/docs/2.x/events#event-listeners
Livewire
Actions | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Livewire
Events | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
rubenvanerk
rubenvanerkOP2y ago
Awesome, thanks!
Want results from more Discord servers?
Add your server