You can split them up if you need, but then you can't point actions to them.
if(Request::is('admin*')){
require __DIR__.'/admin_routes.php';
}
mm.. I mean, the very decision to load all controller classes for the sake of checking available routable methods in them seems an overkill to me.. If an application developer specifies a route that is not routable, it is a problem of developer, not of the application. Why do we even need to know which of the routes are routable and which are not? Just make URLs from patterns and let it be developer's headache if there are too many 404s ;-)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community