0👍
I think there few things that you’ve miss.
If your setup like this Redis + Laravel Echo Server + Socket.io, then you can try this.
- Update
BROADCAST_DRIVER, QUEUE_DRIVER, QUEUE_CONNECTION
on.env
file to redis. Runredis-server
, andartisan queue:listen --tries=1
and alsolaravel-echo-server start
- On your Event class, there’s no data you want to sent/broadcast. Try add
broadcastWith
method and simply return whatever data you want inside that method. You can read on Laravel official documentation https://laravel.com/docs/5.6/broadcasting#broadcast-data
0👍
One thing is to remove the ‘.’ from the beginning of the event name ‘MessageSent’:
Echo.channel('chat-channel').listen('MessageSent', (message) => ...
Also you can check out this reply
- [Vuejs]-Webpack "Uncaught Type Error" when importing Firebase module into standard Vue.js project
- [Vuejs]-Vue onclick sort child component in parent component
Source:stackexchange.com