Laravel /broadcasting/auth Always Fails With 403 Error

后端 未结 8 2114
时光取名叫无心
时光取名叫无心 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:10

    I solve it by creating channel route.

    Create your Authorizing Channels in routes->channels.php

    Broadcast::channel('chatroom', function ($user) {
        return $user;
    });
    

    See Documentation : https://laravel.com/docs/5.4/broadcasting#authorizing-channels

    thanks

提交回复
热议问题