Laravel - Broadcasting - Listening For Events

Once you have installed and instantiated Laravel Echo, you are ready to start listening for events that are broadcast from your Laravel application. First, use the channel method to retrieve an instance of a channel, then call the listen method to listen for a specified event:

    
    Echo.channel(`orders.${this.order.id}`)
        .listen('OrderShipmentStatusUpdated', (e) => {
            console.log(e.order.name);
        });
	

If you would like to listen for events on a private channel, use the private method instead. You may continue to chain calls to the listen method to listen for multiple events on a single channel:

    
    Echo.private(`orders.${this.order.id}`)
        .listen(...)
        .listen(...)
        .listen(...);