sentAt = now()->toJSON(); } public function broadcastOn(): array { return [ new PrivateChannel("team.{$this->teamId}"), ]; } public function broadcastAs(): string { return 'v5.realtime.test'; } /** * @return array{message: string, teamId: int, sentAt: string} */ public function broadcastWith(): array { return [ 'message' => $this->message, 'teamId' => $this->teamId, 'sentAt' => $this->sentAt, ]; } }