diff --git a/src/ResourceSyncing/ModelNotSyncMasterException.php b/src/ResourceSyncing/ModelNotSyncMasterException.php index 1022b054..4ddf7a55 100644 --- a/src/ResourceSyncing/ModelNotSyncMasterException.php +++ b/src/ResourceSyncing/ModelNotSyncMasterException.php @@ -12,6 +12,6 @@ class ModelNotSyncMasterException extends Exception { public function __construct(string $class) { - parent::__construct("Model of $class class is not a SyncMaster model. Make sure you're using the central model to make changes to synced resources when you're in the central context"); + parent::__construct("Model of $class class is not a SyncMaster model. Make sure you're using the central model to make changes to synced resources when you're in the central context."); } } diff --git a/src/helpers.php b/src/helpers.php index 35abeaf7..91d55910 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -112,7 +112,7 @@ if (! function_exists('tenant_channel')) { function tenant_channel(string $channelName, Closure $callback, array $options = []): void { // Register '{tenant}.channelName' - Broadcast::channel('{tenant}.' . $channelName, fn ($user, $tenantKey, ...$args) => $callback($user, ...$args), $options); + Broadcast::channel('{tenant}.' . $channelName, $callback, $options); } } @@ -121,17 +121,6 @@ if (! function_exists('global_channel')) { { // Register 'global__channelName' // Global channels are available in both the central and tenant contexts - Broadcast::channel('global__' . $channelName, fn ($user, ...$args) => $callback($user, ...$args), $options); - } -} - -if (! function_exists('universal_channel')) { - function universal_channel(string $channelName, Closure $callback, array $options = []): void - { - // Register 'channelName' - Broadcast::channel($channelName, $callback, $options); - - // Register '{tenant}.channelName' - tenant_channel($channelName, $callback, $options); + Broadcast::channel('global__' . $channelName, $callback, $options); } }