#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.