RedirectIfAuthenticated.php
Go to the documentation of this file.
1 <?php
2 
3 namespace App\Http\Middleware;
4 
5 use Closure;
7 
9 {
18  public function handle($request, Closure $next, $guard = null)
19  {
20  if (Auth::guard($guard)->check()) {
21  return redirect('/');
22  }
23 
24  return $next($request);
25  }
26 }
handle($request, Closure $next, $guard=null)
Handle an incoming request.