On the sample in Laravel Doc it assigns the Echo to window.Echo. laravel.com/docs/7.x/broadcasting#...
Have you tried this way?
The link you sent is for Presence Channels I am using private channels laravel.com/docs/7.x/broadcasting#...
Presence Channels
private channels
Echo.channel('orders') .listen('OrderShipped', (e) => { console.log(e.order.name); });
It gives me an error: "Echo is not defined", I also tried window.Echo
replace Echo.channel with window.Echo.channel......
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
On the sample in Laravel Doc it assigns the Echo to window.Echo. laravel.com/docs/7.x/broadcasting#...
Have you tried this way?
The link you sent is for
Presence Channels
I am usingprivate channels
laravel.com/docs/7.x/broadcasting#...
It gives me an error: "Echo is not defined", I also tried window.Echo
replace Echo.channel with window.Echo.channel......