File: /home/imensosw/liftcincy.imenso.co/app/Notifications/VolunteerApproved.php
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class VolunteerApproved extends Notification
{
use Queueable;
protected $mailData;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($mailData)
{
$this->mailData = $mailData;
}
/**
* 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)
->subject('Service Hours Approved!')
//->greeting("Congratulations ".$this->mailData['volunteer'])
->greeting("Service Hours Approved!")
->line($this->mailData['p1'])
//->line("Your are Approved as Volunteer for the ".$this->mailData['opportunity_title'])
->line("Thanks for showing up for the community! Our nonprofit partner has verified your service for the ".$this->mailData['opportunity_title']." and your Wallet has now been updated with your hours. Keep volunteering to add to your wallet, but don't forget to cash in to attend your favorite concerts and events!")
->action("Volunteer Dashboard", route('dashboard.services_history'))
->salutation('');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}