Skip to main content

Introduction

This guide walks you through migrating a Laravel 10 application — with its Kernel classes and multiple service providers — to the Slim Application Skeleton introduced in Laravel 11.
The official Laravel documentation does not recommend this migration.
  • The Laravel 10 application structure works as-is in Laravel 11 and later, including Laravel 13. There are no plans to deprecate it.
  • This migration is entirely optional — it is neither required nor officially encouraged.
  • Unless you have a deep understanding of how the framework internals work, it is strongly recommended that you skip this migration. This is work for developers who are intimately familiar with the framework.
  • Always back up your project and ensure all tests pass before starting.

When you might consider migrating

You might consider this migration when:
  • You want to align the project with the latest official conventions so new team members can follow the documentation directly.
  • You want consistency with packages and starter kits created with Laravel 11 or later.
  • You want to simplify the codebase by removing legacy configuration files and classes that came from the old structure.

Prerequisites

This guide assumes the following:
  • You have already upgraded the Laravel framework to laravel/framework ^11.0 or later.
  • All existing tests pass.
  • You understand the Laravel 11+ application structure.

Migration example

The steps below show how to migrate a project that was originally created with Laravel 10 + Breeze (Blade stack), keeping Breeze in place while updating only the application structure.
1

Replace bootstrap/app.php

The old bootstrap/app.php created an $app instance and registered the kernel classes. Replace it with the Application::configure() fluent chain.Before (Laravel 10):
After (Laravel 11+):
Leave the withMiddleware() and withExceptions() callbacks empty for now. You will populate them in later steps when you migrate customizations from the kernel files you are about to remove.
2

Remove the HTTP kernel (app/Http/Kernel.php)

app/Http/Kernel.php defined global middleware, middleware groups, and middleware aliases.Before (app/Http/Kernel.php):
In Laravel 11, all of the middleware listed above are built into the framework as default values. If you have no customizations, you can delete app/Http/Kernel.php directly.If you do have customizations (custom middleware added or removed), migrate them to withMiddleware() in bootstrap/app.php before deleting the file:
Once you have migrated any customizations, delete app/Http/Kernel.php.
In Laravel 11, the default middleware classes such as TrustProxies, EncryptCookies, and VerifyCsrfToken are also no longer needed in app/Http/Middleware/. If you have not customized them, you can delete those files too — the framework provides the defaults internally.
3

Remove the Console kernel (app/Console/Kernel.php)

app/Console/Kernel.php was responsible for defining the schedule and auto-loading commands.Before (app/Console/Kernel.php):
Command auto-loading: Laravel 11+ automatically scans app/Console/Commands/, so the $this->load() call is no longer needed.Schedule definitions: Move them to routes/console.php or to withSchedule() in bootstrap/app.php:
After migrating any schedule definitions, delete app/Console/Kernel.php.
Do not delete your custom Artisan command files inside app/Console/Commands/. Only the Kernel.php class file should be removed.
4

Remove the exception handler (app/Exceptions/Handler.php)

app/Exceptions/Handler.php configured exception reporting and rendering.Before (app/Exceptions/Handler.php):
If you have customizations, migrate them to withExceptions() in bootstrap/app.php before deleting the file:
If you added extra fields to $dontFlash, you can migrate them like this:
Once you have migrated any customizations, delete app/Exceptions/Handler.php.
5

Remove RouteServiceProvider and migrate route registration

app/Providers/RouteServiceProvider.php loaded route files and configured rate limiting.Before (app/Providers/RouteServiceProvider.php):
Route file registration: Move to withRouting() in bootstrap/app.php:
Rate limiting: Move to AppServiceProvider::boot():
If you use the HOME constant anywhere in the codebase, replace it with the URL string directly or move the constant to AppServiceProvider.After migrating, delete app/Providers/RouteServiceProvider.php.
6

Consolidate service providers

Laravel 10 shipped with five default service providers. Consolidate them into a single AppServiceProvider.php.Providers to remove (migrate their contents to AppServiceProvider first):Example: migrating AuthServiceProvider:
After deleting the individual provider files, remove them from the providers array in config/app.php:
Then create bootstrap/providers.php to switch to the new structure:
When bootstrap/providers.php exists, Laravel uses it as the authoritative list of service providers and ignores the providers array in config/app.php.
7

Update the base Controller class

The Laravel 10 Controller base class used the AuthorizesRequests and ValidatesRequests traits. The new base class is a simple abstract class with no traits.Before (Laravel 10):
After (Laravel 11+):
Replace calls to the trait methods as follows:If your existing controllers call trait methods, you can either update each controller individually or keep the traits in the base Controller class. Both approaches work — you do not need to change everything at once.
If Breeze or Jetstream generated authentication controllers that call $this->validate() or $this->authorize(), verify they still work correctly before modifying the base class.
8

Remove unused config files

Config files such as config/cors.php, config/hashing.php, and config/view.php can be deleted if you have not changed them from their defaults — the framework ships with built-in defaults for all of these. Keep any file where you have made actual changes.
9

Update public/index.php

Rewrite public/index.php to match the new application bootstrap:
10

Update artisan

Rewrite the artisan file as well:
11

Update tests/TestCase.php

The CreatesApplication trait is no longer needed. Update tests/TestCase.php and delete tests/CreatesApplication.php:
12

Update .env, .env.example, and phpunit.xml

Some environment variables were renamed between Laravel 10 and 11 — for example, CACHE_DRIVER became CACHE_STORE. Update these files if necessary, but keep in mind that changes here also affect your config files and production environment. There is no need to rush these updates; they can be done incrementally.
13

Verify everything works

After completing the migration, run the following checks in order:
If you encounter any issues, restore the affected files from your backup and check the error messages carefully.

File structure after migration

The following shows what your project should look like after completing the migration (changes from the old structure are noted):

Summary

Further reading

Last modified on May 4, 2026