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.
5 Replies
I tried using $livewire->dispatch(), but same result
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
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?
Nope. The queue is a separate process and has no knowledge of your form
Can we add a livewire script in the front end, which will listen for websocket message with processed form data and fill it?