Laravel - Notifications - Listening For Notifications

Notifications will broadcast on a private channel formatted using a {notifiable}.{id} convention. So, if you are sending a notification to an App\Models\User instance with an ID of 1, the notification will be broadcast on the App.Models.User.1 private channel. When using Laravel Echo, you may easily listen for notifications on a channel using the notification method:

    
    Echo.private('App.Models.User.' + userId)
        .notification((notification) => {
            console.log(notification.type);
        });