AbehoM's avatar

Alert the user about a job done using socket (Broadcasting?)

Guys, Laravel has a broadcast support right? I have something in mind that I can't figure out how it works. For example, take https://convertio.co/. When you select a file it will upload, add to a queue, convert the file and return the download link. The entire progress is described in real time by sockets. The question I have is: how can I get access to the user socket on a job so I can notify him that the process is done and return the results as well to be displayed on the page in real time? :thinking:

0 likes
2 replies
Snapey's avatar

Have a look at broadcasting (https://laravel.com/docs/7.x/broadcasting) and Laravel Echo

The user will be listening for specific event types. When your job completes, it can fire an event which is received by anyone listening to that event on a user specific channel.

Please or to participate in this conversation.