From ffe6cc19b436d229515c67150a6faeaefcd43388 Mon Sep 17 00:00:00 2001 From: freek Date: Mon, 26 Nov 2018 00:49:36 +0100 Subject: [PATCH] nitpicks --- resources/views/console.blade.php | 6 +++--- src/LaravelEcho/Pusher/Dashboard.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/console.blade.php b/resources/views/console.blade.php index 1fc817f..2bd0d7e 100644 --- a/resources/views/console.blade.php +++ b/resources/views/console.blade.php @@ -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); }); }, diff --git a/src/LaravelEcho/Pusher/Dashboard.php b/src/LaravelEcho/Pusher/Dashboard.php index c115864..af2de7c 100644 --- a/src/LaravelEcho/Pusher/Dashboard.php +++ b/src/LaravelEcho/Pusher/Dashboard.php @@ -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,