Which version of Slim are you running? That article is pretty old and refers to an old version of Slim.
If you have hundreds of route files, do you have hundreds of routes in each file? The first thing that comes to mind is that your route organization might not be correct-- you might be writing many more routes than you need. Unless you have a massive, complex application.
In Slim 3 you can “compile” all of your routes into one router cache file. You can find information on that in the Slim Default Settings section of the docs, see routerCacheFile.
Can you post some examples of your dynamic routes? I’m was thinking of doing this for my next project but your sample code will help me figuring this out.
Thanks in advance.
It doesn’t grow unless you do a lot of wierd stuff. The trick is, that it just finds out via reflection what to do, and you never ever have to add another route by hand. Call me lazy