Laravel Tutorials / updated: August 06, 2014

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';
}

Laravel News Partners

Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.