#dispatch event from outside livewire
1 messages · Page 1 of 1 (latest)
Sounds like you'd benefit from Laravel Echo as per the docs: https://livewire.laravel.com/docs/events#real-time-events-using-laravel-echo
1 messages · Page 1 of 1 (latest)
Heyyyy quick question i want to dispatch event from a api route like this
Livewire::dispatch('new-notification', userId: $booking->reservation->user->id);
but it give me this error Livewire\LivewireManager::dispatch() so it is really possible to send event oustide livewire ?
Sounds like you'd benefit from Laravel Echo as per the docs: https://livewire.laravel.com/docs/events#real-time-events-using-laravel-echo