jeudi 29 juin 2017

ReactJs - Laravel hide element if user not Administrator

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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tonsh6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire