check() && auth()->user()->currentTeam()) { $teamId = auth()->user()->currentTeam()->id; } $this->teamId = $teamId; $this->serverUuid = $serverUuid; } public function broadcastOn(): array { if (is_null($this->teamId)) { return []; } return [ new PrivateChannel("team.{$this->teamId}"), ]; } public function broadcastAs(): string { return 'ServerValidated'; } public function broadcastWith(): array { return [ 'teamId' => $this->teamId, 'serverUuid' => $this->serverUuid, ]; } }