ldc-boutique-cnc/app/Notifications/Customer/DestroyCustomer.php
2023-02-13 14:57:01 +01:00

42 lines
1.1 KiB
PHP

<?php
namespace App\Notifications\Customer;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class DestroyCustomer extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Build the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
/** @var string $firstname */
$firstname = $notifiable->api_data->firstname;
return (new MailMessage())
->subject(trans("Supression du compte - :siteName", [
'siteName' => config('theme.site_name')
]))
->greeting("Bonjour " . $firstname)
->line(trans("Votre compte :siteName vient d'être supprimé.", [
'siteName' => config('theme.site_name')
]));
}
}