![]() ![]() To assist you in building these types of features, Laravel makes it easy to "broadcast" your server-side Laravel events over a WebSocket connection. Once the event is received, we can display a message to the user that their CSV has been emailed to them without them ever needing to refresh the page. When the CSV has been created and mailed to the user, we can use event broadcasting to dispatch a App\Events\UserDataExported event that is received by our application's JavaScript. However, creating this CSV file takes several minutes so you choose to create and mail the CSV within a queued job. WebSockets provide a more efficient alternative to continually polling your application's server for data changes that should be reflected in your UI.įor example, imagine your application is able to export a user's data to a CSV file and email it to them. ![]() When some data is updated on the server, a message is typically sent over a WebSocket connection to be handled by the client. In many modern web applications, WebSockets are used to implement realtime, live-updating user interfaces. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |