File: D:/HostingSpaces/SBogers10/slenders.komma.pro/app/Notifications/CustomerRegistered.php
<?php
namespace App\Notifications;
use App\Komma\Users\Models\SiteUser;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
/**
* Confirmation to an admin that a customer has registered an account
*
*/
class CustomerRegistered extends Notification
{
use Queueable;
/** @var SiteUser $customer */
private $customer;
/**
* Create a new notification instance.
*
* @param SiteUser $customer
*/
public function __construct(SiteUser $customer)
{
$this->customer = $customer;
}
/**
* 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()
{
$message = (new MailMessage)->view('emails.customer.registered', [
'customer' => $this->customer
])->subject(__('notifications.customer_registered.subject', ['first_name' => $this->customer->first_name, 'last_name' => $this->customer->last_name]));
return $message;
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}