From 1d80a9cd8ff119546cd3b94e0efa553b42672b6f Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Thu, 10 Sep 2026 20:52:39 -0400 Subject: [PATCH 1/2] chore: remove unused leafs/http dependency to clean up the project --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 68e3d97..5512189 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ "leafs/password": "^5.0", "leafs/session": "^5.0", "leafs/db": "^5.0", - "leafs/http": "^5.0", "firebase/php-jwt": "^7.0" }, "config": { From 0214abe04276f6f22d8300844e4b4108c50cede3 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Tue, 20 Oct 2026 21:20:44 -0400 Subject: [PATCH 2/2] fix(auth): check if response function exists before redirection Add a check for function_exists('response') before calling it to prevent fatal errors in environments where the helper is not available. --- src/Auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Auth.php b/src/Auth.php index 5f77c10..2ec319b 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -689,8 +689,9 @@ public function logout($action = null): bool return true; } - if ($action) { + if ($action && function_exists('response')) { response()->redirect($action); + exit; }