2023-12-15 15:53:55 +00: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
|
|
|
|
|
*/
|
2024-01-26 16:24:14 +01:00
|
|
|
public function toMail(object $notifiable): \Illuminate\Notifications\Messages\MailMessage
|
2023-12-15 15:53:55 +00:00
|
|
|
{
|
|
|
|
|
/** @var string $firstname */
|
|
|
|
|
$firstname = $notifiable->api_data->firstname;
|
|
|
|
|
|
|
|
|
|
return (new MailMessage())
|
|
|
|
|
->subject(trans("Mise à jour du mot de passe - :site_name", [
|
|
|
|
|
'site_name' => config('app.name')
|
|
|
|
|
]))
|
|
|
|
|
->greeting("Bonjour " . $firstname)
|
|
|
|
|
->line(trans("Le mot de passe associé à votre compte :site_name vient d'être modifié.", [
|
|
|
|
|
'site_name' => config('app.name')
|
|
|
|
|
]));
|
|
|
|
|
}
|
|
|
|
|
}
|