Answer the question
In order to leave comments, you need to log in
How to set permissions in laravel?
There is an online store, there is such a function to add a product. It is necessary that when a person enters the site there is a login form, after if the person is an administrator and he enters his username and password, he will have such access that he can delete and change products on the site.
PS Maybe the question was not correctly composed, but I did not know how to put the question correctly.
Answer the question
In order to leave comments, you need to log in
In Laravel 5.2 (more precisely, since 5.1.11) there are wonderful internal means of differentiating access rights (authorization). Plus, in 5.2, for the feature of an additional login by the administrator, you can write your own authentication guard. Or you can not do it, just set a flag in the session that this user is an admin, and check this in access rights.
laravel.su/docs/5.2/authentication
laravel.su/docs/5.2/authorization
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question