source: app/Http/Middleware/CheckVerifyNewEmail.php@ 79aa35c

Last change on this file since 79aa35c was 0a1fb54, checked in by beratkjufliju <kufliju@…>, 3 years ago

bug fixes

  • Property mode set to 100644
File size: 579 bytes
RevLine 
[7304c7f]1<?php
2
3namespace App\Http\Middleware;
4
5use Closure;
6use App\Models\User;
7
8class CheckVerifyNewEmail
9{
10 /**
11 * Handle an incoming request.
12 *
13 * @param \Illuminate\Http\Request $request
14 * @param \Closure $next
15 * @return mixed
16 */
17 public function handle($request, Closure $next)
18 {
19 $id = $request->route("id");
20 $token = $request->route("token");
21
22 $user = User::findOrFail($id);
23
24 if($user->is_active) {
[0a1fb54]25 return redirect()->route("auth.showLogin");
[7304c7f]26 }
27
28 return $next($request);
29 }
30}
Note: See TracBrowser for help on using the repository browser.