Few config files exist
Few config files exist
config/ directory is used for those files.The project-side config/ and the framework-side config/ are merged, with the project side taking precedence. You can create a file at any point when customization is needed and it will be picked up.app/Http/Middleware and app/Http/Kernel.php missing — middleware configuration
app/Http/Middleware and app/Http/Kernel.php missing — middleware configuration
app/Http/Kernel.php has been removed. Middleware configuration is now done via withMiddleware() in bootstrap/app.php.app/Http/Middleware/.$this->middleware() not available in controllers
$this->middleware() not available in controllers
$this->middleware() is a feature of Illuminate\Routing\Controller. It is not available in the new structure’s empty base controller.Instead, implement the HasMiddleware interface and define a middleware() method:#[Middleware] attribute:app/Console/Kernel.php missing — schedule configuration
app/Console/Kernel.php missing — schedule configuration
app/Console/Kernel.php has been removed. The location for defining scheduled tasks has changed.Define schedules in routes/console.php (recommended):bootstrap/app.php:How to register events and listeners
How to register events and listeners
EventServiceProvider has been removed, and manual event and listener registration is no longer required.Auto-discovery: Declare the event class as a type hint on the handle() method of your listener class, and it will be registered automatically.AppServiceProvider::boot():How to add service providers (no providers key in config/app.php)
How to add service providers (no providers key in config/app.php)
config/app.php to bootstrap/providers.php.artisan make:provider are automatically added to this file.app/Exceptions/Handler.php missing
app/Exceptions/Handler.php missing
app/Exceptions/Handler.php has been removed. Exception handling is now configured via withExceptions() in bootstrap/app.php.How to customize routing
How to customize routing
withRouting() in bootstrap/app.php.Adding a route file:RouteServiceProvider):Specifying using disables Laravel’s default route registration entirely, giving you full control.How to replace a default Laravel ServiceProvider
How to replace a default Laravel ServiceProvider
providers key to config/app.php. It will be merged with the framework’s own config/app.php and take effect.replace() method lets you swap a default provider with your own implementation.routes/api.php missing
routes/api.php missing
routes/api.php- Laravel Sanctum for API authentication
- API route registration in
bootstrap/app.php
routes/channels.php missing
routes/channels.php missing
routes/channels.php- Laravel Reverb installation and configuration
- Broadcasting configuration file
How to determine if a joined project uses old or new structure
How to determine if a joined project uses old or new structure
bootstrap/app.php.Laravel 11+ new structure (or migrated):return Application::configure(..., it uses the new structure. Otherwise, the project was upgraded from the legacy structure. To migrate a legacy project to the new structure, see the Migration Guide.Related pages
Laravel 11+ Application Structure
ApplicationBuilder.