At my new job, I have been blessed with an eight year old PHP application that has been migrated to Laravel. It started off without a framework, and was then moved to the Velocity framework (Which is essentially Laravel 2). It has since been moved to Laravel 3, 4, and now 5.1. This thing is old. This application does a lot, and has a ton of code (about 1.5 million lines, not including any vendor files). Surprisingly, it has been kept fairly well, with only a few references to old Velocity code, some Laravel 3 stuff, and quite a bit of Laravel 4 (The Laravel 5.1 upgrade happened a couple of weeks ago).
With all of that said, there's about 600 unique routes, and all of them are pretty well structured, and I don't foresee the ability to reduce this count; in fact, it's still growing. None of the routes have names, and pretty much everything uses Route::controller, as to keep the routes.php file down to a mere 900 lines. I'd like to upgrade everything to named routes, and start using Route::resource and other methods where possible, as I'm not a fan of Route::controller (And apparently it was deprecated in 5.2). Either way, this needs to be organized, as the problem is only getting worse with time.
I can think of a few approaches, like creating an ~/app/Http/Routes folder, and filling it up with files. There's about 40 models, several API routes, and a few additional routes not really tied to anything specific. I'd like to organize this the best way possible. Any ideas?
I'm not really looking for a "put X in Y" solution, as that's my job (and you probably don't have enough information), but rather a clean way of referencing/defining routes outside the main routes.php file.
Using include <filepath>; is an obvious solution, so I'd like something a bit cleaner. For example, most of the file references in Laravel don't have the .php extension, and use a . instead of a / (Like layouts.master instead of layouts/master.php). I also want to avoid doing something like this: include __DIR__/Routes/api.php, as I'd much rather just do something like Route::include('api'), or some other clean alternative.
tl;dr:
I have way too many routes. How should I clean them up? What tactics have you guys used in the past, or are currently using?