I’ve got a question regarding what logic to put inside a middleware vs. what logic to put inside a controller?
E.g. if I need to transform the response of a single route, would that logic live directly inside the controller where I also fetch the data? Or would that logic live inside a middleware that runs after the controller returned the data?
Are there any best practices?
Thanks a lot for your answers