Laravel Broadcasting does't write to redis but direct call to redis works
up vote
0
down vote
favorite
I have tried sereval tuto to try to setup Laravel Redis NodeJs Socket.
And it'is not working.
So far :
- my broadcast fires as I can see it in Laravel log
- my redis server works (I have added a call to Redis in my homecontroller and I can see the value in the log and in redis-cli monitor - I have also installed Horizon and I can see its call in Redis-cli monitor)
But when my broadcast fires I don't see anything in redis-cli monitor
I have already tried the obvious things (cache/ config clear / reboot / ...)
Help will be very apreciated !
Redis call in my homecontroller : working
Redis::set("foo","bar");
$value = Redis::get("foo");
Log::debug('Redis value :'.$value);
.Env
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=siview
DB_USERNAME=root
DB_PASSWORD=
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
BROADCAST_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Database.php
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 60,
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
'pubsub' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 2,
],
],
Boadcasting.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'pubsub',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
Event
<?php
namespace AppEvents;
use IlluminateBroadcastingChannel;
use IlluminateQueueSerializesModels;
use IlluminateBroadcastingPrivateChannel;
use IlluminateBroadcastingPresenceChannel;
use IlluminateFoundationEventsDispatchable;
use IlluminateBroadcastingInteractsWithSockets;
use IlluminateContractsBroadcastingShouldBroadcast;
use AppUser;
class SendMessageEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
private $user;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the channels the event should broadcast on.
*
* @return IlluminateBroadcastingChannel|array
*/
public function broadcastOn()
{
return new PrivateChannel('App.User.' . $this->user->id);
}
public function broadcastWith()
{
return ['message' => 'Salut ' . $this->user->name];
}
}
Route Channel
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return true;//(int) $user->id === (int) $id;
});
Route web
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();
Route::get('/send/{user}', function(AppUser $user){
event(new AppEventsSendMessageEvent($user));
});
Route::get('/home', 'HomeController@index')->name('home');
Laravel.log showing my broascast
[2018-11-04 09:39:42] local.INFO: Broadcasting [AppEventsSendMessageEvent] on channels [private-App.User.1] with payload:
{
"message": "Salut nathalie",
"socket": null
}
redis-cli monitor showing my homecontroller test
1541324518.159040 [0 127.0.0.1:59334] "SELECT" "0"
1541324518.159776 [0 127.0.0.1:59334] "SET" "foo" "bar"
1541324518.160360 [0 127.0.0.1:59334] "GET" "foo"
laravel redis broadcast
add a comment |
up vote
0
down vote
favorite
I have tried sereval tuto to try to setup Laravel Redis NodeJs Socket.
And it'is not working.
So far :
- my broadcast fires as I can see it in Laravel log
- my redis server works (I have added a call to Redis in my homecontroller and I can see the value in the log and in redis-cli monitor - I have also installed Horizon and I can see its call in Redis-cli monitor)
But when my broadcast fires I don't see anything in redis-cli monitor
I have already tried the obvious things (cache/ config clear / reboot / ...)
Help will be very apreciated !
Redis call in my homecontroller : working
Redis::set("foo","bar");
$value = Redis::get("foo");
Log::debug('Redis value :'.$value);
.Env
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=siview
DB_USERNAME=root
DB_PASSWORD=
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
BROADCAST_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Database.php
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 60,
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
'pubsub' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 2,
],
],
Boadcasting.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'pubsub',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
Event
<?php
namespace AppEvents;
use IlluminateBroadcastingChannel;
use IlluminateQueueSerializesModels;
use IlluminateBroadcastingPrivateChannel;
use IlluminateBroadcastingPresenceChannel;
use IlluminateFoundationEventsDispatchable;
use IlluminateBroadcastingInteractsWithSockets;
use IlluminateContractsBroadcastingShouldBroadcast;
use AppUser;
class SendMessageEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
private $user;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the channels the event should broadcast on.
*
* @return IlluminateBroadcastingChannel|array
*/
public function broadcastOn()
{
return new PrivateChannel('App.User.' . $this->user->id);
}
public function broadcastWith()
{
return ['message' => 'Salut ' . $this->user->name];
}
}
Route Channel
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return true;//(int) $user->id === (int) $id;
});
Route web
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();
Route::get('/send/{user}', function(AppUser $user){
event(new AppEventsSendMessageEvent($user));
});
Route::get('/home', 'HomeController@index')->name('home');
Laravel.log showing my broascast
[2018-11-04 09:39:42] local.INFO: Broadcasting [AppEventsSendMessageEvent] on channels [private-App.User.1] with payload:
{
"message": "Salut nathalie",
"socket": null
}
redis-cli monitor showing my homecontroller test
1541324518.159040 [0 127.0.0.1:59334] "SELECT" "0"
1541324518.159776 [0 127.0.0.1:59334] "SET" "foo" "bar"
1541324518.160360 [0 127.0.0.1:59334] "GET" "foo"
laravel redis broadcast
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have tried sereval tuto to try to setup Laravel Redis NodeJs Socket.
And it'is not working.
So far :
- my broadcast fires as I can see it in Laravel log
- my redis server works (I have added a call to Redis in my homecontroller and I can see the value in the log and in redis-cli monitor - I have also installed Horizon and I can see its call in Redis-cli monitor)
But when my broadcast fires I don't see anything in redis-cli monitor
I have already tried the obvious things (cache/ config clear / reboot / ...)
Help will be very apreciated !
Redis call in my homecontroller : working
Redis::set("foo","bar");
$value = Redis::get("foo");
Log::debug('Redis value :'.$value);
.Env
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=siview
DB_USERNAME=root
DB_PASSWORD=
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
BROADCAST_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Database.php
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 60,
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
'pubsub' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 2,
],
],
Boadcasting.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'pubsub',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
Event
<?php
namespace AppEvents;
use IlluminateBroadcastingChannel;
use IlluminateQueueSerializesModels;
use IlluminateBroadcastingPrivateChannel;
use IlluminateBroadcastingPresenceChannel;
use IlluminateFoundationEventsDispatchable;
use IlluminateBroadcastingInteractsWithSockets;
use IlluminateContractsBroadcastingShouldBroadcast;
use AppUser;
class SendMessageEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
private $user;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the channels the event should broadcast on.
*
* @return IlluminateBroadcastingChannel|array
*/
public function broadcastOn()
{
return new PrivateChannel('App.User.' . $this->user->id);
}
public function broadcastWith()
{
return ['message' => 'Salut ' . $this->user->name];
}
}
Route Channel
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return true;//(int) $user->id === (int) $id;
});
Route web
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();
Route::get('/send/{user}', function(AppUser $user){
event(new AppEventsSendMessageEvent($user));
});
Route::get('/home', 'HomeController@index')->name('home');
Laravel.log showing my broascast
[2018-11-04 09:39:42] local.INFO: Broadcasting [AppEventsSendMessageEvent] on channels [private-App.User.1] with payload:
{
"message": "Salut nathalie",
"socket": null
}
redis-cli monitor showing my homecontroller test
1541324518.159040 [0 127.0.0.1:59334] "SELECT" "0"
1541324518.159776 [0 127.0.0.1:59334] "SET" "foo" "bar"
1541324518.160360 [0 127.0.0.1:59334] "GET" "foo"
laravel redis broadcast
I have tried sereval tuto to try to setup Laravel Redis NodeJs Socket.
And it'is not working.
So far :
- my broadcast fires as I can see it in Laravel log
- my redis server works (I have added a call to Redis in my homecontroller and I can see the value in the log and in redis-cli monitor - I have also installed Horizon and I can see its call in Redis-cli monitor)
But when my broadcast fires I don't see anything in redis-cli monitor
I have already tried the obvious things (cache/ config clear / reboot / ...)
Help will be very apreciated !
Redis call in my homecontroller : working
Redis::set("foo","bar");
$value = Redis::get("foo");
Log::debug('Redis value :'.$value);
.Env
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=siview
DB_USERNAME=root
DB_PASSWORD=
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
BROADCAST_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Database.php
'redis' => [
'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 60,
],
'cache' => [
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
'pubsub' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 2,
],
],
Boadcasting.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'pubsub',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];
Event
<?php
namespace AppEvents;
use IlluminateBroadcastingChannel;
use IlluminateQueueSerializesModels;
use IlluminateBroadcastingPrivateChannel;
use IlluminateBroadcastingPresenceChannel;
use IlluminateFoundationEventsDispatchable;
use IlluminateBroadcastingInteractsWithSockets;
use IlluminateContractsBroadcastingShouldBroadcast;
use AppUser;
class SendMessageEvent implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
private $user;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the channels the event should broadcast on.
*
* @return IlluminateBroadcastingChannel|array
*/
public function broadcastOn()
{
return new PrivateChannel('App.User.' . $this->user->id);
}
public function broadcastWith()
{
return ['message' => 'Salut ' . $this->user->name];
}
}
Route Channel
<?php
/*
|--------------------------------------------------------------------------
| Broadcast Channels
|--------------------------------------------------------------------------
|
| Here you may register all of the event broadcasting channels that your
| application supports. The given channel authorization callbacks are
| used to check if an authenticated user can listen to the channel.
|
*/
Broadcast::channel('App.User.{id}', function ($user, $id) {
return true;//(int) $user->id === (int) $id;
});
Route web
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();
Route::get('/send/{user}', function(AppUser $user){
event(new AppEventsSendMessageEvent($user));
});
Route::get('/home', 'HomeController@index')->name('home');
Laravel.log showing my broascast
[2018-11-04 09:39:42] local.INFO: Broadcasting [AppEventsSendMessageEvent] on channels [private-App.User.1] with payload:
{
"message": "Salut nathalie",
"socket": null
}
redis-cli monitor showing my homecontroller test
1541324518.159040 [0 127.0.0.1:59334] "SELECT" "0"
1541324518.159776 [0 127.0.0.1:59334] "SET" "foo" "bar"
1541324518.160360 [0 127.0.0.1:59334] "GET" "foo"
laravel redis broadcast
laravel redis broadcast
asked Nov 4 at 10:03
Nathalie
1108
1108
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I have found and it's a bit strange :
I am working on windows with wamp.
The wamp server was started by not the Laravel server.
Strangly everything seemed to work well (no errors, pages rendered, auth was working...)
I just started laravel with : php artisan serve
and now I can see in Redis-cli monitor :
1541328214.873429 [0 127.0.0.1:52962] "SELECT" "2"
1541328214.874260 [2 127.0.0.1:52962] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328661.366923 [0 127.0.0.1:53078] "SELECT" "2"
1541328661.367643 [2 127.0.0.1:53078] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328679.554077 [0 127.0.0.1:53083] "SELECT" "2"
1541328679.555197 [2 127.0.0.1:53083] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I have found and it's a bit strange :
I am working on windows with wamp.
The wamp server was started by not the Laravel server.
Strangly everything seemed to work well (no errors, pages rendered, auth was working...)
I just started laravel with : php artisan serve
and now I can see in Redis-cli monitor :
1541328214.873429 [0 127.0.0.1:52962] "SELECT" "2"
1541328214.874260 [2 127.0.0.1:52962] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328661.366923 [0 127.0.0.1:53078] "SELECT" "2"
1541328661.367643 [2 127.0.0.1:53078] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328679.554077 [0 127.0.0.1:53083] "SELECT" "2"
1541328679.555197 [2 127.0.0.1:53083] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
add a comment |
up vote
0
down vote
accepted
I have found and it's a bit strange :
I am working on windows with wamp.
The wamp server was started by not the Laravel server.
Strangly everything seemed to work well (no errors, pages rendered, auth was working...)
I just started laravel with : php artisan serve
and now I can see in Redis-cli monitor :
1541328214.873429 [0 127.0.0.1:52962] "SELECT" "2"
1541328214.874260 [2 127.0.0.1:52962] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328661.366923 [0 127.0.0.1:53078] "SELECT" "2"
1541328661.367643 [2 127.0.0.1:53078] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328679.554077 [0 127.0.0.1:53083] "SELECT" "2"
1541328679.555197 [2 127.0.0.1:53083] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I have found and it's a bit strange :
I am working on windows with wamp.
The wamp server was started by not the Laravel server.
Strangly everything seemed to work well (no errors, pages rendered, auth was working...)
I just started laravel with : php artisan serve
and now I can see in Redis-cli monitor :
1541328214.873429 [0 127.0.0.1:52962] "SELECT" "2"
1541328214.874260 [2 127.0.0.1:52962] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328661.366923 [0 127.0.0.1:53078] "SELECT" "2"
1541328661.367643 [2 127.0.0.1:53078] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328679.554077 [0 127.0.0.1:53083] "SELECT" "2"
1541328679.555197 [2 127.0.0.1:53083] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
I have found and it's a bit strange :
I am working on windows with wamp.
The wamp server was started by not the Laravel server.
Strangly everything seemed to work well (no errors, pages rendered, auth was working...)
I just started laravel with : php artisan serve
and now I can see in Redis-cli monitor :
1541328214.873429 [0 127.0.0.1:52962] "SELECT" "2"
1541328214.874260 [2 127.0.0.1:52962] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328661.366923 [0 127.0.0.1:53078] "SELECT" "2"
1541328661.367643 [2 127.0.0.1:53078] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
1541328679.554077 [0 127.0.0.1:53083] "SELECT" "2"
1541328679.555197 [2 127.0.0.1:53083] "PUBLISH" "private-App.User.1" "{"event":"App\\Events\\SendMessageEvent","data":{"message":"Salut nathalie","socket":null},"socket":null}"
answered Nov 4 at 10:56
Nathalie
1108
1108
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53139618%2flaravel-broadcasting-doest-write-to-redis-but-direct-call-to-redis-works%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password