This is an anti-pattern to have functionality switched on route because this is functionality that belongs in the router. Instead call 5 very tiny controllers that call the same functionality. Or if this is a more structural design of your application you can extend the router and add extra parameters.