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.