Laravel Programming-Laravel admin Prefix group call in route


If you try to protect admin route from anyone who is not logged in. Basically if user is not logged in and try to access /admin I want to redirect him to login.

ay you have admin routes such as the below that require the current user to be logged in:

/admin/users, /admin/groups

You could then define and protect those routes to logged in users as follows: