Refer to the tutorial http://laravelacademy.org/post/3502.html when doing front-end and back-end user authentication
I encountered a problem that when a non-logged-in user accesses /admin, it should jump to / admin/login, but I don’t know why it always jumps to /login. Please ask me what is the reason?
The jump address should be modified in the middleware
Authenticate under AppHttpMiddleware
return redirect()->guest('admin/login');
That’s it
Authenticate middleware
route.php