44 lines
1.3 KiB
PHP
44 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.
|
|
*
|
|
* @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): \Illuminate\Notifications\Messages\MailMessage
|
|
{
|
|
/** @var string $firstname */
|
|
$firstname = $notifiable->username;
|
|
|
|
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' => $firstname]))
|
|
->line(trans("Le mot de passe associé à votre compte :site_name vient d'être modifié.", [
|
|
'site_name' => config('app.name')
|
|
]));
|
|
}
|
|
}
|