userId = $userId; } public function broadcastOn(): ?array { if (! is_null($this->userId)) { return [ new PrivateChannel("user.{$this->userId}"), ]; } return null; } }