Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send info from One browser to another in Laravel 5.2.37

I have a page where user can Add/Update records. Code is written in Laravel 5.2

Let's say I opened the that add/update page in chrome and same url in FireFox. So, if user create a new record in Chrome browser, info should be received immediately to Firefox. So, that I don't need to send ajax based reqeust to server to show complete list.

My question is, where should I start for this? Is there any blog that I can go through step by step ?

like image 493
Pankaj Avatar asked Nov 29 '22 23:11

Pankaj


1 Answers

You definitely need to use WebSockets to achieve it. There a couple of good links in the tiagoRL's answer. But also, since you said you are using Laravel 5.2 I strongly recommend you to broadcast events. If you are a Laracasts user, take a look to the related videos.

Basically this is the main link:

https://laravel.com/docs/5.2/events#broadcasting-events

Also to simplify the server-side stuff, I'd go for Pusher

like image 192
jhmilan Avatar answered Dec 04 '22 05:12

jhmilan