Laravel Websockets-軟體包用法和演示



http://usefullaravelpackages.com

我們來看看Spatie的Freek和超越代碼的Marcel的Laravel Websockets軟體包。該軟體包是一個用PHP編寫的websockets伺服器,可以替代Pusher。我們來看一下演示聊天應用程序的運行,我們還使用Pusher轉換了我的一個項目來使用此程序包。然後,我們花一些時間使它在真實的生產伺服器上運行,設置主管,並確保所有內容都已加密。

嘗試聊天:https://chat.laravelecommerceexample.ca
GitHub存儲庫:https://github.com/drehimself/laravel-websockets-demo

帶Pusher / Echo的實時Laravel:https://www.youtube.com/watch?v = pjK0VMTCtVg
GitHub回購:https://github.com/drehimself/laravel-realtime-example/tree/laravel-websockets

Freek的深入博客文章:https://murze.be/introducing-laravel-websockets-an-easy-to-use-websocket-server-implemented-in-php

#鏈接
我的課程:https://codewithdre.com
訂閱我的新聞通訊:http://andremadarang.com/newsletter
我的網站:http://andremadarang.com
Twitter:http://twitter.com/drehimself
GitHub:http://github.com/drehimself
CodePen:http://codepen.io/drehimself。

33 comments
  1. No, it doesn't simply work. The package has huge issues and is nowhere near production ready but besides that, even after digging through the docs and github issues I am simply left with: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT. No wonder Pusher is making millions with their service.

  2. Hello Sir please do you have any idea how to configure the websocket in server ( nginx ) i use laravel homestead
    i tried all google tutorials but hard for me to understand
    Thanks

  3. Hey Andre,

    Do you have any idea how to make a custom websocket handler ?

    cauz I tried it before but I have an issue :

    *Target [SymfonyComponentConsoleOutputOutputInterface] is not instantiable while building [BeyondCodeLaravelW

    ebSocketsServerLoggerWebsocketsLogger].*

    Do you have any idea about it?

    Thank you for all!

  4. Nice guide! You took a lot of time to help everyone else debug it. I got one question though, why did you use supervisor and not Forge Daemons? Wouldn't Daemons do the same thing as supervisor? (Side thought… I guess that's good for those who don't use forge.)

  5. I really love this package. I feel like every paid service should have an open source alternative. Was thinking of building a dashboard package around ElasticSearch or Solr To be kind of an alternative to Algolia.

Comments are closed.