ldc-gen-game-web/app/Notifications/Customer/UpdatePassword.php
2026-10-20 12:27:49 +02:00

47 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Notifications\Customer;
use App\Models\Settings;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class UpdatePassword extends Notification
{
/**
* Get the notification's delivery channels.
*
* @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.
*/
public function toMail(object $notifiable): MailMessage
{
/** @var Settings */
$settings = resolve(Settings::class);
/** @var \App\Models\Customer $notifiable */
/** @var string $first_name */
$first_name = $notifiable->api_data->firstname;
return new MailMessage()
->subject(trans('front.mails.subjects.update_password', [
'site_name' => $settings->name,
]))
->greeting(trans('front.mails.greetings.with_name', ['first_name' => $first_name]))
->line(trans('front.mails.contents.update_password', [
'site_name' => $settings->name,
]));
}
}