action = $action; $this->campaign = $campaign; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->subject('Campaign Approved - ' . config('app.name')) ->view('campaign::campaign.email.action', ['data' => $this->campaign]); } /** * Get the notification's delivery channels. * * @param object $notifiable * @return array */ public function via(object $notifiable): array { return ['mail']; } }