File: /home/imensosw/liftcincy.imenso.co/app/Notifications/VolunteerInvitation.php
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class VolunteerInvitation 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)
{
if($this->mailData['mail_to'] == 'OLD'){
$action_url = route('dashboard.services_history');
$action_text = "Add Volunteer Opportunity to Account";
}else{
$action_url = route('frontend.checkout');
$action_text = "SignUp to Add Volunteer Opportunity";
}
return (new MailMessage)
->subject("Concerted: You've Been Invited to Volunteer!")
//->greeting("Thank you ".$this->mailData['volunteer_name'])
->greeting("You're Invited to Volunteer!")
->line("Hi there,")
->line(" You've been invited by ".$this->mailData['partner_name']." to sign up for ".$this->mailData['opportunity_title'].". Please click the button below to add this opportunity to your account. After you successfully complete your service hours, ".$this->mailData['partner_name']." will verify you showed up - at which point you can cash your hard-earned hours in for free tickets to concerts, sporting events, and more!")
->line("Why? We are here to help the helpers, connect our community, and increase access to live entertainment. Give back. Get tickets.")
->line('With love,')
->line('The Concerted Team')
->action($action_text, $action_url)
//->line("If you don't have a Concerted account, please click here to sign up")
//->line($this->mailData['partner_name'])
//->line($this->mailData['address_line1'].' '.$this->mailData['address_city'].' '.$this->mailData['address_state'].' '.$this->mailData['address_postcode'])
->salutation('');
//->salutation('With love,')
//->salutation('With love,The Concerted Team');
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}