Laravels routes files can get pretty busy. Before you know it, you have to search within the routes file to find anything.

We can add extra route loading in the provider: class RouteServiceProvider extends ServiceProvider { public function boot(): void { $this->configureRateLimiting(); $this->routes(function (): void { Route::middleware('api') ->group(base_path('routes/api.php')); Route::middleware('api') ->group(base_path('routes/resource/catalog.php')); Route::middleware('api') ->group(base_path('routes/resource/orders.php')); Route::middleware('api') ->group(base_path('routes/resource/payments.php')); Route::middleware('api') ->group(base_path('routes/resource/deliveries.php')); }); }}

You open the routes file and look at the routes registered to understand the application size and how things are put together.

Looking at the routes file, we can see the groups building up your application, but it isn’t taking over the file - even if you end up with 20-30 groups, it is still pretty readable.
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