$channelName, 'event' => 'log-message', '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->broadcastToEveryoneExcept( (object) $payload, null, $appId ); } else { $channelManager->broadcastAcrossServers( $appId, $channelName, (object) $payload ); } } }