From ce83b4ec69df018a64d37d5d11b57d9c3f37a1e8 Mon Sep 17 00:00:00 2001 From: salam Date: Wed, 15 Oct 2025 17:01:08 +0200 Subject: [PATCH] wip --- .../ResetPasswordNotification.php | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/app/Notifications/ResetPasswordNotification.php b/app/Notifications/ResetPasswordNotification.php index 5beb130..a8114e2 100644 --- a/app/Notifications/ResetPasswordNotification.php +++ b/app/Notifications/ResetPasswordNotification.php @@ -2,35 +2,20 @@ namespace App\Notifications; -use Illuminate\Bus\Queueable; -use Illuminate\Notifications\Messages\MailMessage; -use Illuminate\Notifications\Notification; +use Filament\Facades\Filament; +use Illuminate\Support\Facades\Lang; class ResetPasswordNotification extends Notification { use Queueable; - /** - * Create a new notification instance. - */ - public function __construct() - { - // - } + public function __construct(private readonly string $token) {} - /** - * Get the notification's delivery channels. - * - * @return array - */ public function via(object $notifiable): array { return ['mail']; } - /** - * Get the mail representation of the notification. - */ public function toMail(object $notifiable): MailMessage { return (new MailMessage) @@ -42,15 +27,8 @@ class ResetPasswordNotification extends Notification ->line(Lang::get('Wenn Sie keine Passwortzurücksetzung beantragt haben, sind keine weiteren Maßnahmen erforderlich.')); } - /** - * Get the array representation of the notification. - * - * @return array - */ - public function toArray(object $notifiable): array + protected function resetUrl(mixed $notifiable): string { - return [ - // - ]; + return Filament::getResetPasswordUrl($this->token, $notifiable); } }