Snipe-IT
Open Source Asset Management
FEATURES
DEMO
DOWNLOAD
DOCUMENTATION
HOSTED SOLUTION
SUPPORT
Intro
Namespaces
Classes
Files
Misc
snipe-it
app
Http
Middleware
RedirectIfAuthenticated.php
Go to the documentation of this file.
1
<?php
2
3
namespace
App\Http\Middleware
;
4
5
use
Closure
;
6
use
Illuminate\Support\Facades\Auth
;
7
8
class
RedirectIfAuthenticated
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
}
Closure
Auth
App\Http\Middleware
Definition:
Authenticate.php:3
App\Http\Middleware\RedirectIfAuthenticated
Definition:
RedirectIfAuthenticated.php:8
App\Http\Middleware\RedirectIfAuthenticated\handle
handle($request, Closure $next, $guard=null)
Handle an incoming request.
Definition:
RedirectIfAuthenticated.php:18