https://ldc-services-web.sentry.io/issues/4806040997/?environment=production&project=4506512363159552&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=0
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications\Customer;
|
|
|
|
use App\Models\Settings;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class DestroyCustomer 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'];
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*
|
|
* @param object $notifiable
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
*/
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
/** @var \App\Models\Settings */
|
|
$settings = app(Settings::class);
|
|
|
|
/** @var \App\Models\Customer $notifiable */
|
|
/** @var string $first_name */
|
|
$first_name = $notifiable->api_data->firstname;
|
|
|
|
return (new MailMessage())
|
|
->subject(trans('Supression du compte - :site_name', [
|
|
'site_name' => $settings->name
|
|
]))
|
|
->greeting(trans('Bonjour :first_name', ['first_name' => $first_name]))
|
|
->line(trans(
|
|
"Votre compte :site_name a été marqué pour suppression,
|
|
il sera définitivement effacé au bout de 1 semaine.
|
|
Vous pourrez le réactiver durant ce délai si vous le
|
|
souhaitez en vous reconnectant.",
|
|
[
|
|
'site_name' => $settings->name
|
|
]
|
|
));
|
|
}
|
|
}
|