2018-05-08 05:27:03 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Notifications;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
|
|
|
|
class ExpectedCheckinAdminNotification extends Notification
|
|
|
|
{
|
|
|
|
use Queueable;
|
|
|
|
/**
|
|
|
|
* @var
|
|
|
|
*/
|
|
|
|
private $params;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new notification instance.
|
|
|
|
*
|
|
|
|
* @param $params
|
|
|
|
*/
|
|
|
|
public function __construct($params)
|
|
|
|
{
|
|
|
|
$this->assets = $params;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the notification's delivery channels.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
2020-05-23 11:56:56 -07:00
|
|
|
public function via()
|
2018-05-08 05:27:03 -07:00
|
|
|
{
|
|
|
|
$notifyBy = [];
|
|
|
|
$notifyBy[]='mail';
|
|
|
|
return $notifyBy;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the mail representation of the notification.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
|
|
*/
|
2020-05-23 11:56:56 -07:00
|
|
|
public function toMail()
|
2018-05-08 05:27:03 -07:00
|
|
|
{
|
|
|
|
|
|
|
|
$message = (new MailMessage)->markdown('notifications.markdown.report-expected-checkins',
|
|
|
|
[
|
|
|
|
'assets' => $this->assets,
|
|
|
|
])
|
2020-11-12 15:05:57 -08:00
|
|
|
->subject(trans('mail.Expected_Checkin_Report'));
|
2018-05-08 05:27:03 -07:00
|
|
|
|
|
|
|
return $message;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|