user = $user; $this->subscription_info = $subscription_info; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->greeting('Hello!') ->subject('Your account has been upgraded') ->line('Your account has been upgraded with the following packages') ->line('Package: '.$this->subscription_info->package_details['name']) ->line('Valid Till: '.\Carbon\Carbon::parse($this->subscription_info['end_date'])->isoFormat('D/MM/YYYY')) ->line('Description: '.$this->subscription_info->package_details['description']); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ // ]; } }