3 ms·
> "All routes defined in one single file instead of procedurally in each controller (performance wise this is terrible cause you're running a bunch of regular e
by lowercased 5y ago
> "All routes defined in one single file instead of procedurally in each controller (performance wise this is terrible cause you're running a bunch of regular expressions on each and every request. augh)"
Have you timed it? And do you have a flexible alternative measurably faster that can drop in/ Are you taking in to account route caching?
Not everything has to be in one file. RouteServiceProvider gives you a place where you can programmatically determine which route files, if any, you want to process.
> File structure doesn't adhere to PHP league standard
So what? And... "all php code should in in src or tests..." That doesn't even seem to be documented anywhere. PHP code could live in /config (like... you seem to want above?) - but 'config' isn't /src or /tests.
- hparadiz 5y agoThis article has and it's pretty bad https://voltagead.com/laravel-route-caching-for-improved-performance/ https://voltagead.com/laravel-route-caching-for-improved-per... A good routing framework would not need to use a cache at all. Mine doesn't and I've built huge platforms with it. I say platforms cause my last big one was a website, 3rd party api, and mobile app back-end all integrated into one thing.