ldc-legaulois/app/Notifications/Customer/UpdatePassword.php
2026-07-30 13:10:06 +02:00

42 lines
1.3 KiB
PHP

<?php
namespace App\Notifications\Customer;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class UpdatePassword 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 du mot de passe - :site_name", [
'site_name' => config('app.name')
]))
->greeting(trans('Bonjour :name,', ['name' => $notifiable->api_data->firstname]))
->line(trans("Le mot de passe associé à votre compte :strong sur le Club des Gaulois :endStrong vient d'être modifié.",
[
'strong' => '<strong>',
'endStrong' => '</strong>'
]
))
->action(trans('Me connecter au club'), route('club.login'));
}
}