From 903d766906fcfb8f4571c2d5dcf97dd5dfec7b2b Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:08:11 +1100 Subject: [PATCH] Undo --- app/Http/Controllers/KeyController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/KeyController.php b/app/Http/Controllers/KeyController.php index 7509bcd..fab3f51 100644 --- a/app/Http/Controllers/KeyController.php +++ b/app/Http/Controllers/KeyController.php @@ -15,10 +15,9 @@ class KeyController extends Controller { $fetchKeys = InviteKey::where('created_by', Auth::id())->latest()->get(); $activeKey = InviteKey::where('created_by', Auth::id())->latest()->first(); - $userJoin = User::where('created_at', Auth::id()) if (!$fetchKeys->isEmpty()) { - if ($activeKey->created_at->addWeek()->gt(Carbon::now()) || !$userJoin->addWeek()->gt(Carbon::now())) { + if ($activeKey->created_at->addWeek()->gt(Carbon::now())) { $canCreate = false; if (User::isAdmin()) { if ($activeKey->created_at->addMinute()->gt(Carbon::now())) {