File: D:/HostingSpaces/SBogers10/liempde.ehbo.today/app/Notifications/CustomerIbanChanged.php
<?php
namespace App\Notifications;
use App\KommaApp\Users\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
/**
* Confirmation to a eurotools admin that a customer has edited his account
*/
class CustomerIbanChanged extends Notification
{
use Queueable;
/** @var User $customer */
private $customer;
/**
* Create a new notification instance.
*
* @param User $unsavedCustomer to detect the differences the user must not yet be saved.
*/
public function __construct(User $unsavedCustomer)
{
$this->customer = $unsavedCustomer;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail()
{
$message = (new MailMessage)->view('emails.customer.iban_changed', [
'customer' => $this->customer
])->subject(__('notifications.customer_iban_changed.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 [
//
];
}
}