Shift with red gradient lettering

Slim your Laravel Application

The Laravel Slimmer automates the slimming of a Laravel application which has been upgraded to Laravel 11 either by simply bumping the laravel/framework dependency or following the Upgrade Guide.

Laravel 11 introduced a slimmer application structure by removing default core files such as middleware, kernels, and providers, as well as configuration files. It also introduced a new application bootstrapping.

The goal of slimming your application not only makes your Laravel application feel fresh and modern, but makes maintaining your Laravel application easier.

Screenshot of a pull request with automated changes from the Laravel Slimmer

Requirements

The Laravel Slimmer requires a Laravel 11 application containing core files which may be slimmed.

Automated Changes

The Laravel Slimmer automates the following changes:

  • Applying your code style.
  • Reconfiguring your application bootstrapping.
  • Removing core files no longer included in a Laravel 11 application.
  • Converting routes to use static ::class references instead of strings.
  • Re-registering your HTTP middleware.
  • Migrating your scheduled commands.
  • Consolidating your service providers.
  • Streamlining your configuration files.
  • Detecting changed ENV variables.
  • Removing unused folders from previous Laravel folder structures.

Manual Upgrades

While the Laravel Slimmer attempts to slim as many of the core files as possible, those which are heavily customized may need human review. When Shift detects these it adds a detailed comment to the Pull Request to guide any additional steps you may need to do manually.

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.