Good afternoon.
How can I make a restriction of some specific routes with Laravel?
For example. If I have an e-commerce I will have the admin users who will be able to access the routes of the administrative panel and all the other routes of the site. But I will also have the users / clients say so. They will be able to access the routes of the site and their login in the client area, but they will not be able to access the routes of the administrative panel.
Another example:
Routes (/ admin / home) (/ admin / products) (/ admin / edit-products) - > These routes only administrators will be able to access.
(/ my-purchases) (/ my-cart) - > These routes clients and administrators can access.
But if I do the same authentication for users / clients and for administrators, I will not be able to do this restriction. If the guy is logged in he will be able to access any route on my system, regardless of whether he is an administrator or a client.
Understand? Can you help me?