No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AuthCheckLogin.php 437B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Closure;
  4. use Auth;
  5. class AuthCheckLogin
  6. {
  7. /**
  8. * Handle an incoming request.
  9. *
  10. * @param \Illuminate\Http\Request $request
  11. * @param \Closure $next
  12. * @return mixed
  13. */
  14. public function handle($request, Closure $next)
  15. {
  16. if (empty(Auth::id())) {
  17. return redirect(route('auth.index'));
  18. }
  19. return $next($request);
  20. }
  21. }