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