Closed andredsnogueira closed 4 years ago
Same here, everything is fine at laravel side but it seems not working. Also, I`m using socket-io too.
Same here, everything is fine at laravel side but it seems not working. Also, I`m using socket-io too.
First connection okay and then nothing happens on nuxt-side?
@andredsnogueira I solved it ! I discovered after last updates redis added a prefix before channel names. If you configure that prefix by the empty string at config/database.php, it is working. Do not forget to run php artisan cache:clear command too at the end.
'redis => [
'client' => env('REDIS_CLIENT', 'predis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'predis'),
'prefix' => '',
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
'prefix' => '',
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
],
@andredsnogueira I solved it ! I discovered after last updates redis added a prefix before channel names. If you configure that prefix by the empty string at config/database.php, it is working. Do not forget to run php artisan cache:clear command too at the end.
'redis => [ 'client' => env('REDIS_CLIENT', 'predis'), 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'predis'), 'prefix' => '', ], 'default' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_DB', 0), 'prefix' => '', ], 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => env('REDIS_CACHE_DB', 1), ], ],
It works. I will close this issue.
I'm trying to receive events from Laravel Backend through Redis. Using laravel-echo-server start i can see the events firing from Backend but i am unable to receive on my nuxt application.
As title said when i open the page the socket connection went fine but after that nothing happens. If i'm not wrong in the Chrome Devtools Network tab i should see pooling requests, right?
I'm using socket-io.
Thanks in advance.