Hi everyone,
I have been working with Slim Framework for a while and I love its simplicity and flexibility. However…, as my project grows; I am finding my middleware logic becoming a bit messy and hard to maintain.
Here are a few specific challenges I am facing:
Middleware chaining :- How to efficiently chain multiple middlewares without making the code look cluttered: ??
Reusability :- What’s the best way to make middleware reusable across different routes: ??
Order of execution :- How do you manage middleware execution order when dealing with complex applications: ??
I am looking for tips or best practices that align with Slim’s principles of being lightweight and efficient. If you have encountered similar challenges or have insights on how to keep middleware clean and maintainable…, I would greatly appreciate your advice. I have also searched on the forum for the thread related to my query and I found this one thread https://discourse.slimframework.com/t/models-middleware-philosophy-architecture-devops but coludn’t get any help.
Looking forward to learning from the community !!
With Regards,
Marcelo Salas