This commit is contained in:
freek 2018-11-26 00:49:36 +01:00
parent 3a0ba1d594
commit ffe6cc19b4
2 changed files with 6 additions and 6 deletions

View File

@ -125,9 +125,9 @@
this.subscribeToChannel('subscribed');
this.subscribeToChannel('client_message');
this.subscribeToChannel('client-message');
this.subscribeToChannel('api_message');
this.subscribeToChannel('api-message');
},
disconnect() {
@ -136,7 +136,7 @@
subscribeToChannel(channel) {
this.pusher.subscribe('{{ \BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Dashboard::LOG_CHANNEL_PREFIX }}'+channel)
.bind('log_message', (data) => {
.bind('log-message', (data) => {
this.logs.push(data);
});
},

View File

@ -14,8 +14,8 @@ class Dashboard
const TYPE_VACATED = 'vacated';
const TYPE_OCCUPIED = 'occupied';
const TYPE_SUBSCRIBED = 'subscribed';
const TYPE_CLIENT_MESSAGE = 'client_message';
const TYPE_API_MESSAGE = 'api_message';
const TYPE_CLIENT_MESSAGE = 'client-message';
const TYPE_API_MESSAGE = 'api-message';
public static function connection(ConnectionInterface $connection)
{
@ -81,7 +81,7 @@ class Dashboard
$channel = app(ChannelManager::class)->find($appId, $channelId);
optional($channel)->broadcast([
'event' => 'log_message',
'event' => 'log-message',
'channel' => $channelId,
'data' => [
'type' => $type,