47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications\Customer;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
use Symfony\Component\Mime\Email;
|
|
|
|
class DestroyCustomer extends Notification
|
|
{
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*
|
|
* @return array<int, string>
|
|
*/
|
|
public function via(): array
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
/**
|
|
* Get the mail representation of the notification.
|
|
*/
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
return (new MailMessage())
|
|
->view([
|
|
'html' => 'notifications::email-club',
|
|
'text' => 'notifications::email-club-text',
|
|
])
|
|
->subject(trans('Supression du compte - :site_name', [
|
|
'site_name' => config('app.name'),
|
|
]))
|
|
->greeting(trans('Bonjour :name', ['name' => $notifiable->username]))
|
|
->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' => config('app.name'),
|
|
]
|
|
))->withSymfonyMessage(function (Email $message) {
|
|
$message->html($message->getHtmlBody(), 'utf-8');
|
|
});
|
|
}
|
|
}
|