'log-message', 'channel' => $channelName, 'data' => [ 'type' => $type, 'time' => strftime('%H:%M:%S'), 'details' => $details, ], ]; // Here you can use the ->find(), even if the channel // does not exist on the server. If it does not exist, // then the message simply will get broadcasted // across the other servers. $channel = $channelManager->find($appId, $channelName); if ($channel) { $channel->broadcastLocally( $appId, (object) $payload ); } $channelManager->broadcastAcrossServers( $appId, null, $channelName, (object) $payload ); } }