#1:Laravel WebSockets安装和配置实时聊天应用



Laravel WebSockets软件包是由Marcel Pociot和Freek Van der Herten开发的。它是用PHP为您的Laravel应用程序实现的WebSockets服务器。该Laravel WebSockets替代了Pusher和JavaScript库Laravel Echo服务器。

在本视频中,您将学习如何在项目中的Laravel广播示例中安装,配置和使用此WebSocket软件包。在第二部分中,我们将一起使用Laravel WebSockets,VueJs和Laravel-echo构建一个实时聊天系统。

Laravel WebSockets是在Ratchet(用于WebSocket的PHP库)的顶部构建的。

???????????????????????????????????????????????????:
https://github.com/hkp22/php-websocket-example

?????????????:
https://docs.beyondco.de/laravel-websockets/

#?:????-??????????,???.????-????

#?-?????????????????????????????????

???????????????????????????????????:
https://github.com/qirolab/Laravel-WebSockets-Chat-Example

????-??????????(???????,?????,???????-????)????????:

DigitalOcean推荐
https://m.do.co/c/e740238537d0

另外,请关注我们:
????????:https://fb.com/qirolab
???????:https://twitter.com/qirolab

26 comments
  1. Sir done subscribed to your channel, I am getting the events using the dashboard of websocket. But I can't get/listen it in my front-end. Is there some configuration that cause of these? Tried it to convert it to Public Channel it works, but in Presence Channel like yours I can't listen it to my front-end, Please help me

  2. Sir done what you said. I am getting the events using the dashboard of websocket. But I can't get/listen it in my front-end. Is there some configuration that cause of these? Tried it to convert it to Public Channel it works, but in Presence Channel like yours I can't listen it to my front-end, Please help me.

  3. Hello i pushed laravel websocket to live production
    and got this error
    please do you have anyidea sir
    details :
    ——–
    failed: Error during WebSocket handshake: Unexpected response code: 502

  4. FOr those running on live domain, make sure to run, php artisan websockets:serve on your serve else it will throw Error in connection establishment: net::ERR_CONNECTION_REFUSED…………………… run php artisan websockets:serve

  5. First you should uncomment this line. otherwise it will give broadcast/auth error. config app then un comment this line . AppProvidersBroadcastServiceProvider::class,

Comments are closed.