laravel-echo-module
laravel-echo-module copied to clipboard
Not receiving any data from echo
Hi, I'm having trouble getting any data to come through with this package and wonder whether it's working as intended. I've got Laravel Websockets set up (the package) and have my websocket server running and can see in the console that it is receiving data, but I'm not seeing any data coming through my channel to my Nuxt JS project.
/*
** Echo config
*/
echo: {
broadcaster: 'pusher',
key: 'websocketkey',
host: 'http://localhost:6001',
plugins: [ '~/plugins/echo.js' ],
},
In my web page, I've got:
this.$echo.channel('agents')
.listen('AgentStats', (e) => {
console.log(e);
});
}
My event channel is called agents, it's on a private channel, and the event is called AgentStats, but I see no data logged in my console log.
did you manage to solve it?
did you manage to solve it?
Use .on instead of .listen
ok thanks. I can see your echo configuration file in nuxt is a little bit different . I that everything?. Or there is no difference between host and wsHost?