From a1ca99620a3314e319bba0566f48cc5844bed5c3 Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Thu, 15 Dec 2022 16:18:26 +0100 Subject: [PATCH] notify logins --- app/Http/Livewire/Auth/LNUrlAuth.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Livewire/Auth/LNUrlAuth.php b/app/Http/Livewire/Auth/LNUrlAuth.php index ec018247..b745282c 100644 --- a/app/Http/Livewire/Auth/LNUrlAuth.php +++ b/app/Http/Livewire/Auth/LNUrlAuth.php @@ -4,6 +4,7 @@ namespace App\Http\Livewire\Auth; use App\Models\LoginKey; use App\Models\User; +use App\Notifications\ModelCreatedNotification; use eza\lnurl; use Livewire\Component; use SimpleSoftwareIO\QrCode\Facades\QrCode; @@ -44,6 +45,10 @@ class LNUrlAuth extends Component if ($loginKey) { $user = User::find($loginKey->user_id); + + \App\Models\User::find(1) + ->notify(new ModelCreatedNotification($user, 'users')); + auth()->login($user); return to_route('welcome');