message = $message->toArray(); } else { $this->message = $message; } $this->message['event'] = $event; } /** * Get the array representation of the notification. * * @return array */ public function toArray(): array { return $this->message; } /** * Get the notification's delivery channels. * * @return array */ public function via(): array { return [WebChannel::class]; } }