I've set up events, like it was described here
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?