Laravel Route Registrars is an amazing package that introduces a clean object-based way to define your routes in a Laravel application. If you're installing this package on a fresh laravel installation, you'll want to run the following command before you do anything with your routes. This will overwrite the app/Providers/RouteServiceProvider.php file with one compatible with the route registrars, and create default route registrars to replace both routes/web.php and routes/api.php.

Create the route registrar in app/Http/Routes/Web, an option left in for those of you that are splitting the Web and API routes.

Call the following method with an instance of the laravel router, and the fully qualified class name of the registrars.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners