I am developing web app, where I have 2 types of Users : Administrator and Simple_user obviously with different permissions.
Now, I put on my page a list of element, and I would show button "deleted element" only to administrator, so hide to Simple_user.
I' am using laravel blade, with http://ift.tt/1dvwKFA for pass variable from Laravel to ReactJs View, I thought pass a variable like "admin => true" if Auth::user() is administrator but I'm not Sure if it is the best choice.
Could you give me an advice?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire