2

In my Laravel project I have implemented Laravel WebSockets following this article: https://freek.dev/1228-introducing-laravel-websockets-an-easy-to-use-websocket-server-implemented-in-php

I have implemented MyCustomWebSocketHandler class and everything works fine with APP_DEBUG=true in the .env file.

But when APP_DEBUG=false, non of the implemenations in the MyCustomWebSocketHandler class is being executed. It uses the default BeyondCode\LaravelWebSockets\WebSockets\WebSocketHandler class.

After searching for solutions on Google, I found this: https://github.com/beyondcode/laravel-websockets/issues/296

But the comment of matheusb-comp is not true. It still does not work, even class MyCustomWebSocketHandler implements MessageComponentInterface { }.

How can I fix it that with APP_DEBUG=false in the .env file, the Laravel WebSockets still works with the implementations in the MyCustomWebSocketHandler class?

O Connor
  • 4,236
  • 15
  • 50
  • 91

0 Answers0