Laravel Tip – Break up your routes

Do you have a lot of routes? Are they getting hard to manage?

Here is a Laravel quick tip to help you clean them up. Use the Request::is() method to break them out into separate files. Here is an example:

if (Request::is('admin/*'))
{
    require __DIR__.'/admin_routes.php';
}

Filed in: Laravel Tutorials
Laravel News Partners

Laravel Jobs

Senior Full-Stack Developer
Atlanta, GA - (remote) USA ONLY
Curricula
PHP Laravel Developer
London
Investoo
Looking for Senior Full-stack Laravel/React.js Javascript API Developer - Immediate (Full-time)
Remote
ApproveMe // Document Signing
Wordpress and/or Laravel Developer
Remote (Lexington, KY)
Mediocre Creative
Software Developer
Huntsville, AL
Spur

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.