ldc-boutique-cnc/app/Notifications/Customer/DestroyCustomer.php
Jérémy Munsch 499a8ff66e
- Allow customer to soft delete and full delete
- Fixed customer info update
2023-03-20 12:52:55 +01:00

48 lines
1.4 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 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.",
[
'siteName' => config('theme.site_name')
]
));
}
}