aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Middleware/RedirectIfAuthenticated.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http/Middleware/RedirectIfAuthenticated.php')
-rw-r--r--app/Http/Middleware/RedirectIfAuthenticated.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php
deleted file mode 100644
index fdc707b..0000000
--- a/app/Http/Middleware/RedirectIfAuthenticated.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-namespace App\Http\Middleware;
-
-use App\Providers\RouteServiceProvider;
-use Closure;
-use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Auth;
-use Symfony\Component\HttpFoundation\Response;
-
-class RedirectIfAuthenticated
-{
- /**
- * Handle an incoming request.
- *
- * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
- */
- public function handle(Request $request, Closure $next, string ...$guards): Response
- {
- $guards = empty($guards) ? [null] : $guards;
-
- foreach ($guards as $guard) {
- if (Auth::guard($guard)->check()) {
- return redirect(RouteServiceProvider::HOME);
- }
- }
-
- return $next($request);
- } // End handle().
-}