0
Good afternoon.
How can I restrict some specific routes with Laravel?
For example. If I have an e-commerce I will have users administrators who can access the administrative panel routes and all other routes of the site. But I will also have the users/customers say so. These may access the routes of the site and your login in the client area, but they may not access the administrative panel routes.
Another example:
Routes (/admin/home) (/admin/products) (/admin/edit-products) -> Only administrators can access these routes.
(/My-shopping) (/my-cart) -> These routes customers and administrators can access.
But if I do the same authentication for users/clients and administrators, I won’t be able to do that restriction. If the guy is logged in he will be able to access any route of my system, regardless of whether he is administrator or client.
Do you understand? You can help me?
Good afternoon. I will implement here and give you a feedback. I appreciate the help.
– Maurício Biléssimo
Good morning. It worked! Thanks partner.
– Maurício Biléssimo
You’re welcome @Mauritississimo if you can accept the answer as correct, thank you! Hug
– arllondias