I having some thoughts about what is the most right way to do the develop platform interface for project which grab it's all data from external API.
This platform has few account types, which i currently store in session after the user logging in. for the example i will use 3 account types :
- Admins
- Sellers
- Buyers
What I need : each account type will use same routing path's but - will rendered different templates. for ex. route '/' for admin user will render 'admin-dash' template, and so for 'buyer-dash' and 'seller_dash'
I am storing the account type on session, Session('userRole', 'admin'/'seller'/'publisher'); and if the user is a seller or publisher I am adding an 'account-id' value to the session also, so I will be make use of when i will need to pull data for the current account.
The question is, if can i declare different routes for same path, by the current session data.
So what do you suggest ? Thanks!