1

I've set up events, like it was described here

https://github.com/beyondcode/laravel-websockets/blob/master/docs/advanced-usage/dispatched-events.md

but they are not dispatching when I connect or disconnect to websockets. I have

QUEUE_CONNECTION=sync

settings, no redis.

My code. EventServiceProvider:

        \BeyondCode\LaravelWebSockets\Events\NewConnection::class => [
            App\Listeners\HandleNewConnections::class,
        ],

HandleNewConnections.php:

<?php

namespace App\Listeners;

use Illuminate\Support\Facades\Log;

use BeyondCode\LaravelWebSockets\Events\ConnectionClosed;

class HandleNewConnections
{
    // public function handle(ConnectionClosed $connection)
    public function handle()
    {
        Log::info('Here is new connection');
    }
}

I don't see new log text after connecting. What can I do to make it work?

Lamantinoss
  • 159
  • 1
  • 8

0 Answers0