payload = $payload; $this->connection = $connection; $this->channelManager = $channelManager; } public function respond() { if (! Str::startsWith($this->payload->event, 'client-')) { return; } if (! $this->connection->app->clientMessagesEnabled) { return; } DashboardLogger::clientMessage($this->connection, $this->payload); $channel = $this->channelManager->find($this->connection->app->id, $this->payload->channel); optional($channel)->broadcastToOthers($this->connection, $this->payload); } }