Last change
on this file since d25ba66 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
544 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | namespace App\Http\Middleware;
|
---|
4 |
|
---|
5 | use Closure;
|
---|
6 | use Illuminate\Support\Facades\Auth;
|
---|
7 |
|
---|
8 | class RedirectIfAuthenticated
|
---|
9 | {
|
---|
10 | /**
|
---|
11 | * Handle an incoming request.
|
---|
12 | *
|
---|
13 | * @param \Illuminate\Http\Request $request
|
---|
14 | * @param \Closure $next
|
---|
15 | * @param string|null $guard
|
---|
16 | * @return mixed
|
---|
17 | */
|
---|
18 | public function handle($request, Closure $next, $guard = null)
|
---|
19 | {
|
---|
20 | if (auth()->guard($guard)->check()) {
|
---|
21 | return redirect()->route("dashboard.index");
|
---|
22 | }
|
---|
23 |
|
---|
24 | return $next($request);
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.