From 666865dc08a0d9bf2b954b2399772eaf042324e5 Mon Sep 17 00:00:00 2001 From: Ion Babin Date: Sun, 28 Apr 2024 23:23:52 +0300 Subject: [PATCH] fix: make `SendLoginLink` work --- app/Listeners/SendLoginLink.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Listeners/SendLoginLink.php b/app/Listeners/SendLoginLink.php index 8732fd8..bd9d3b0 100644 --- a/app/Listeners/SendLoginLink.php +++ b/app/Listeners/SendLoginLink.php @@ -21,6 +21,7 @@ public function __construct(private readonly User $user) */ public function handle(RequestedLogin $event): void { - $event->token->notify(new UserRequestedLogin($this->user->whereEmail($event->token->email))); + $user = $this->user->whereEmail($event->token->email); + $user->notify(new UserRequestedLogin($user)); } }