Laravel /broadcasting/auth Always Fails With 403 Error

后端 未结 8 2120
时光取名叫无心
时光取名叫无心 2021-01-04 03:58

I have recently delved into Laravel 5.3\'s Laravel-Echo and Pusher combination. I have successfully set up public channels and moved on to private ones. I am having trouble

8条回答
  •  悲&欢浪女
    2021-01-04 04:12

    What worked for me was to use the method private of the Laravel Echo package: https://laravel.com/docs/5.3/notifications#listening-for-notifications

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

提交回复
热议问题