Laravel 12: New Features and Improvements

Bookmark

Laravel 12, released on March 7, 2025, represents a strategic shift in Laravel's release philosophy, focusing primarily on maintenance and dependency updates rather than introducing major breaking changes. This approach aims to make upgrades seamless for developers while continuing to deliver new features through incremental updates throughout the year. The core philosophy emphasizes stability and developer experience, with most applications able to upgrade with minimal or no code changes.

Bookmark This Article

Your browser doesn't support automatic bookmarking. You can:

  1. Press Ctrl+D (or Command+D on Mac) to bookmark this page
  2. Or drag this link to your bookmarks bar:
Bookmark This

Clicking this bookmarklet when on any page of our site will bookmark the current page.

Release Overview and Philosophy

Laravel 12 is intentionally designed as a maintenance-focused release that updates upstream dependencies with minimal breaking changes. As Taylor Otwell stated, "This is primarily a maintenance focused release that updates upstream dependencies and has minimal breaking changes or major few features. Because of that, the vast majority of applications will be able to upgrade with no changes to your application's code."^1_3 This approach marks a departure from previous yearly releases that often introduced significant changes requiring substantial adaptation. The Laravel team has shifted to focus on shipping new features continually throughout the year without breaking changes, using yearly releases primarily to update dependencies and address PHP version compatibility^1_1. This "boring" release strategy has been well-received by the community as it reduces the upgrade burden that had previously led to developer fatigue with each major version release^1_5. Laravel 12 continues to require PHP 8.2 as the minimum PHP version, maintaining the same requirement as Laravel 11^1_1.

New Starter Kits

The most significant feature of Laravel 12 is the introduction of completely redesigned starter kits for various frontend frameworks:

Official Starter Kit Options

Laravel 12 includes new starter kits for React, Vue, and Livewire, all designed using Tailwind CSS^1_2. These kits provide a comprehensive starting point for new applications with beautifully designed UIs and well-structured code. Each starter kit is pulled from separate GitHub repositories and installed directly into the application, giving developers complete control over all the code instead of hiding it in the vendor directory^1_3. All three starter kits include Shadcn components, and for the Livewire stack specifically, there is an option for a free version of Flux components^1_3. The starter kits offer fully functional authentication flows, including login, registration, dashboard, and settings pages^1_2.

Authentication Variants

Each starter kit also offers a WorkOS AuthKit variant that includes^1_1:

  • Social authentication
  • Passkey authentication
  • Email-based authentication
  • Single Sign-On (SSO) with WorkOS

GitHub Workflows

The starter kits come with preconfigured GitHub CI workflows for linting and testing^1_4. The linting workflow runs Laravel Pint for PHP code formatting, Prettier for frontend code, and ESLint for JavaScript/TypeScript linting. These workflows run on the develop and main branches and their respective pull requests, helping maintain code quality automatically.

Installation and Setup

Installing these starter kits is straightforward using the Laravel installer. After creating a new Laravel 12 application with laravel new, developers are prompted to select their preferred starter kit and authentication method^1_2. The installer handles everything, setting up a fully working application that's ready for development.

Technical Improvements in Laravel 12

While Laravel 12 doesn't introduce many major new features, it does include several technical improvements and dependency updates:

Carbon 3 Support

Laravel 12 removes support for Carbon 2.x and now requires Carbon 3.x^1_7. This update brings the latest improvements from the Carbon date and time manipulation library to Laravel applications.

Dependency Updates

The release includes updates to numerous upstream dependencies, with the complete list containing over 80 items including minor improvements, version bumps, and small fixes^1_5. These updates help keep Laravel applications secure and compatible with the latest PHP ecosystem.

Laravel 12.2 Updates

Following the initial release, Laravel 12.2.0 introduced several notable improvements^1_6:

Community Starter Kit Support

The Laravel Installer now supports community starter kits, making it easier to install third-party starter kits using the familiar laravel new command^1_6. For example: This feature, contributed by Tony Messias, expands the flexibility of Laravel's initialization process and facilitates community contributions.

Test Response Enhancements

Laravel 12.2 added a ddBody() method to the TestResponse class as a convenience for debugging test responses^1_6. This method allows developers to dump the contents of a response or specific JSON keys during testing:

Eloquent Relationship Improvements

Caleb White contributed CanBeOneOfMany support to the HasOneThrough relationship, enabling developers to retrieve a singular model from a larger HasManyThrough relationship^1_6. This feature enhances Laravel's already powerful Eloquent ORM with more nuanced relationship handling.

Upgrade Considerations

Upgrading to Laravel 12 is designed to be straightforward, with an estimated upgrade time of just 5 minutes for most applications^1_7. The key steps involve:

Updating Dependencies

Developers need to update several dependencies in their application's composer.json file^1_7:

  • laravel/framework to ^12.0
  • phpunit/phpunit to ^11.0
  • pestphp/pest to ^3.0

Updating the Laravel Installer

For developers using the Laravel installer CLI tool, updating the installer ensures compatibility with Laravel 12.x and access to the new Laravel starter kits^1_7. This can be done via Composer:

Laravel Shift

For those seeking an even more streamlined upgrade process, Laravel Shift is recommended as the easiest way to automate application upgrades^1_1.

Conclusion

Laravel 12 represents a strategic shift in the framework's development philosophy, prioritizing stability and maintainability while continuing to offer incremental improvements. The focus on new starter kits reflects Laravel's commitment to providing excellent developer experiences from project inception, while the maintenance-oriented approach to the core framework acknowledges the growing number of production Laravel applications that need stability. This release demonstrates how mature frameworks can evolve thoughtfully, balancing innovation with stability. As Laravel continues to release features throughout the year, developers can expect ongoing improvements while enjoying the confidence that comes with a stable foundation. The combination of beautiful starter kits, thoughtful technical improvements, and straightforward upgrade paths ensures Laravel remains at the forefront of PHP development frameworks.