From f410fe83c9b24a5c0dc6d05f89629780218c834a Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 8 Feb 2026 08:48:55 +0100 Subject: [PATCH] fix mail --- app/Livewire/UserNotifications.php | 2 +- app/Mail/UserNotification.php | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/Livewire/UserNotifications.php b/app/Livewire/UserNotifications.php index 476b50f9..9d0b1642 100644 --- a/app/Livewire/UserNotifications.php +++ b/app/Livewire/UserNotifications.php @@ -55,7 +55,7 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has if ($recipient) { if ($data['notify_by_email']) { - Mail::to($recipient)->send(new UserNotification('NUH-Odds sendder: '.auth()->user()->name, $data['message'])); + Mail::to($recipient)->send(new UserNotification($data['message'])); } Notification::make() ->title($data['message']) diff --git a/app/Mail/UserNotification.php b/app/Mail/UserNotification.php index 8db5fc7f..2f8f6ac6 100644 --- a/app/Mail/UserNotification.php +++ b/app/Mail/UserNotification.php @@ -14,15 +14,11 @@ class UserNotification extends Mailable protected string $message; - protected string $subject; - /** * Create a new message instance. */ - public function __construct($subject, $message) + public function __construct($message) { - $this->subject = $subject; - $this->message = $message; } @@ -32,7 +28,7 @@ class UserNotification extends Mailable public function envelope(): Envelope { return new Envelope( - subject: $this->subject, + subject: 'NUH-Odds from: '.auth()->user()->name, ); }