Open goranculibrk opened 4 years ago
Hi @goranculibrk Could you provide a repository for reproduction?
Hello, @goranculibrk, @ricardogobbosouza.
It seems that issues in chained methods.
You can't subscribe by using .listen()
only by .on()
.
Working example (pkg version 1.1.0 and laravel-echo 1.6.0)
this.$echo.channel('ch').on('ev', (e) => {
console.log(e);
});
@hostovichqubeek your solution did not work for me.
Issue solved on #9
Hi there, I'm using 1.1.0 version of the module.
I went through the config and got it all as per instructions, but it seems that this.$echo is not listening for the events.
I can see the messages being received in Dev Tools but the listen code is not responding to them.
Basic example from the documentation:
mounted () { this.$echo.channel('orders') .listen('OrderShipped', (e) => { console.log(e.order.name) }) },
Does not logs the error. I've tried different changing it to justconsole.log(e)
to see if I'll get any data but it doesn't provide anything.What am I missing here?