I'm developing an app using Laravel 5.2 and AngularJS, and I'm using satellizer for the authentication(I started developing this before the auth:make came out). In my User table I have a role column. My question is, how do I control which pages the user can see depending on their role?
I thought about using a middleware, so that whenever a user logs in, it checks the role and then returns something, and then on the AngularJS side, I interpret that something and then there I control what the user sees. Is my reasoning wrong? Any tips?
I haven't done this yet cause I still don't understand how I'm gonna do it and I don't want to "waste" hours and hours doing something that might not work or might not be the correct way.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire