message = $message; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['fcm']; } /** * Get the fcm representation of the notification. * * @param mixed $notifiable * @return FcmMessage */ public function toFcm($notifiable) { return (new FcmMessage()) ->data([ 'title' => $this->message['title'], 'body' => $this->message['body'], ]); } }