ldc-gen-game-web/app/Notifications/Customer/DestroyedCustomer.php
2023-12-12 12:25:45 +01:00

51 lines
1.6 KiB
PHP

<?php
namespace App\Notifications\Customer;
use App\Models\Settings;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class DestroyedCustomer extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param object $notifiable
* @return array<int, string>
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
*/
public function via(object $notifiable): array
{
// phpcs:enable
return ['mail'];
}
/**
* Build the mail representation of the notification.
*
* @param object $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
*/
public function toMail(object $notifiable): MailMessage
{
/** @var \App\Models\Settings */
$settings = app(Settings::class);
// phpcs:enable
return (new MailMessage())
->subject(trans('Votre compte est suprimé - :site_name', [
'site_name' => $settings->name
]))
->greeting('Bonjour')
->line(trans(
"Votre compte :site_name a été définitivement supprimé ainsi ques les données associés,
si vous aviez effectué une commande elle sera bien sûr toujours honorée. Les commandes associés
a votre compte continueront d'exister mais les données de votre compte ont bien été supprimées.",
[
'site_name' => $settings->name
]
));
}
}