broadcast
<?php broadcast(new UserRegistered($user)); broadcast(new UserRegistered($user))->toOthers();
<?php public function send(): void { $broadcast = broadcast($this)->via($this->connection); if (! $this->includeCurrentUser) { $broadcast->toOthers();
<?php } if (! empty($this->broadcastOn($event)) || ! empty($channels)) { return broadcast($instance->onChannels(Arr::wrap($channels))); } }
<?php public static function broadcast() { return broadcast(new static(...func_get_args())); } }