From 9ba88ab56f564c9c1f0dc13ff977f39ad90e7758 Mon Sep 17 00:00:00 2001 From: mychidarko Date: Sun, 15 Dec 2024 17:23:15 +0000 Subject: [PATCH] fix: patch up default redirects --- src/Auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Auth.php b/src/Auth.php index 122f652..f68f2ed 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -41,11 +41,11 @@ class Auth public function __construct() { $this->middleware('auth.required', function () { - response()->redirect('/auth/login', 401); + response()->redirect('/auth/login'); }); $this->middleware('auth.guest', function () { - response()->json('/dashboard', 401); + response()->redirect('/dashboard'); }); $this->middleware('is', function ($role) {