I've been searching for something similar but no luck. I want to build an app that uses different controllers for same urls. Basic idea is like that if a user is logged in as admin he uses lets say admin controller, if user is just a user he uses user controller. This is just an example, basically I want to have a function that decides what controller route takes.
Thank u everyone. Any help is greatly appreciated.
PS Use of this: Admin has different UI and options, Output catching, Separation of concern
You need to create a RouteConstraint to check the user's role, as follows:
Then, before your default route, declare a route for the Admin role, as follows:
counsellorben