I'm trying to figure out the best way to build an application with multiple user types (i.e. Admin, Vendor and Customer).
I'm using Symfony2 to develop the application. I have two options in mind:
- Have one controller and check for the user role and render the corresponding view for that role. (One controller, Multiple views)
- Have one view and check for the user role to render the corresponding piece. (One controller, one view)
The difference between the above two methods, that is think the first one will have views to be cleaner, without too much logic in it. But will lead to too much logic inside the controller.
If there any better way to think this out ?