How to Listen to All Events on 1 Single Channel using Laravel Echo ?
In this lesson, we are going to see how to listen to multiple events at the same time and on one single channel using Laravel Echo.
Listen to all events
So to listen to all events from one channel use the code below:
Echo.private('channel')
.listen('EventOne', (event) => {
//what to do
}).listen('EventTwo', (event) => {
//what to do
}).listen('EventThree', (event) => {
//what to do
});