F
Filament8mo ago
Azorky

Async notifications

How can I send these notifications async? I have this code and I want to give the user instant feedback. Instead of firing 1 notification and 10 second later the other, the 2 notifications are both fired at once at the end of the function.
No description
5 Replies
Azorky
AzorkyOP8mo ago
I tried using $livewire->dispatch(), but same result
Dennis Koch
Dennis Koch8mo ago
You would need Websockets and Broadcasting for that. But I haven't managed to set it up with notifications yet Ideally OCR - or anything that takes some time - should be run on the queue though
Azorky
AzorkyOP8mo ago
Thanks for the quick response! The OCR takes 5 seconds or so, so ideally I want the user to upload something, see some kind of notification, and 5 sec later his whole form is filled in. Is that possible with a queue, to fill in the form from a job?
Dennis Koch
Dennis Koch8mo ago
Nope. The queue is a separate process and has no knowledge of your form
coder96
coder968mo ago
Can we add a livewire script in the front end, which will listen for websocket message with processed form data and fill it?
Want results from more Discord servers?
Add your server