Why does Laravel 12 load routes in the bootstrap file instead of RouteServiceProvider
In Laravel 10, we had a RouteServiceProvider class that handled loading up all your different routes. This is a snippet from that file in an older project I worked on using Laravel 10: RouteServiceProvider.php /** * Define your route model bindings, pattern filters, and other route configuration. */ public function boot(): void { $this->configureRateLimiting(); $this->routes(function () { $this->registerCentralDomainRoutes(); config('app.env') == 'local' && Route::middleware('web')->group(base_path('routes/test.php')); }); } You had access to almost all of the tools and features of the Laravel
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.