ldc-legaulois/app/Notifications/Customer/UpdatePassword.php

45 lines
1.3 KiB
PHP
Raw Normal View History

2024-07-05 16:34:57 +02:00
<?php
namespace App\Notifications\Customer;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class UpdatePassword 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 string $firstname */
$firstname = $notifiable->username;
return (new MailMessage())
2024-07-19 12:05:37 +02:00
->template('notifications::email-club')
2024-07-05 16:34:57 +02:00
->subject(trans("Mise à jour du mot de passe - :site_name", [
'site_name' => config('app.name')
]))
->greeting(trans('Bonjour :name', ['name' => $firstname]))
->line(trans("Le mot de passe associé à votre compte :site_name vient d'être modifié.", [
'site_name' => config('app.name')
]));
}
}