ldc-legaulois/app/Notifications/Customer/UpdateEmail.php
2024-10-08 11:57:56 +02:00

38 lines
1.1 KiB
PHP

<?php
namespace App\Notifications\Customer;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class UpdateEmail 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.
*
* @param object $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail(object $notifiable): \Illuminate\Notifications\Messages\MailMessage
{
return (new MailMessage())
->template('notifications::email-club')
->subject(trans("Mise à jour de l'email - :site_name", [
'site_name' => config('app.name')
]))
->greeting(trans('Bonjour :name', ['name' => $notifiable->username]))
->line(trans("L'email associé à votre compte :site_name vient d'être modifié.", [
'site_name' => config('app.name')
]));
}
}