i want create real time notification system website(social network) i'm using laravel 5.2, using socket.io , redis currently, have created notifevent , broadcasted succesfully, no idea ahead, can please me or guide me.
- you should have
nodejs,socket.io, install on server - when have event, use
redishold variable , sendnodejsor use php library, can send variablephpnodejsserver: http://elephant.io/ - data processing on
nodejs - return php webpage use
socket.io (client javascript)catch event , display end-user (usingemit,on)
you can follow instruction elephant.io: using php socket.io
or redis: https://github.com/laracasts/laravel-redis-and-socket.io
you should try 2 ways , feedback new question if stuck because question unclear , hard answer
you can use javascript send ajax request , variable php , use variable make socket.emit way less security, must use token or if want public website
Comments
Post a Comment