objToJson = $objToJson; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable): array { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return MailMessage */ public function toMail($notifiable): MailMessage { $template = json_decode($this->objToJson); return (new MailMessage)->view( 'emails.test', ['objToJson' => $template] )->subject($template->title); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } }