Files
nutzwerte_fi4/app/Notifications/ResetPasswordNotification.php
T
2025-10-15 17:23:34 +02:00

51 lines
1.5 KiB
PHP

<?php
namespace App\Notifications;
use Filament\Facades\Filament;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ResetPasswordNotification extends Notification
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('Benachrichtigung zum Zurücksetzen des Passworts')
->greeting('Hallo'." {$notifiable->name},")
->line('Sie erhalten diese E-Mail, weil wir eine Anfrage zum Zurücksetzen des Passworts für Ihr Konto erhalten haben.')
->action('Passwort Zurücksetzen', $this->resetUrl($notifiable))
->line('Dieser Link zum Zurücksetzen des Passworts läuft in :count Minuten ab.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')])
->line('Wenn Sie keine Passwortzurücksetzung beantragt haben, sind keine weiteren Maßnahmen erforderlich.');
}
protected function resetUrl(mixed $notifiable): string
{
return Filament::getResetPasswordUrl($this->token, $notifiable);
}
}