What Actually Changed in Laravel 12
Laravel 12 is a minimal-surface release — the framework team deliberately kept breaking changes small so teams can upgrade without a multi-sprint refactor. That does not mean nothing changed. Several decisions affect how you scaffold new projects and which helpers you reach for day-to-day.
Slimmer Application Skeleton
The default laravel/laravel skeleton lost several files that previously shipped but were rarely touched:
app/Http/Kernel.phpis gone — middleware is now registered entirely inbootstrap/app.php(this started in L11 but L12 finalises the pattern).app/Providers/BroadcastServiceProvider.phpandapp/Providers/EventServiceProvider.phpare no longer generated; their responsibilities live inAppServiceProviderorbootstrap/app.php.- The
routes/channels.phpandroutes/console.phpfiles are opt-in rather than always present.
If you are upgrading an existing L11 app, none of your existing files are deleted — the skeleton change only affects laravel new projects.
First-Party Starter Kits
Laravel 12 ships three official starter kits via laravel/breeze and a new laravel/react / laravel/vue path:
# React starter (Inertia v2, TypeScript, Tailwind v4)
laravel new my-app --using=react
# Vue starter
laravel new my-app --using=vue
# Livewire starter (Volt or class-based)
laravel new my-app --using=livewire
Each kit now includes WorkOS AuthKit as an optional authentication layer, giving you social login and SSO out of the box. You can opt out and keep the classic email/password flow.
Practical note: The
--usingflag delegates to the kit's own installer. If your CI pipeline runslaravel new, pin the kit version explicitly to avoid unexpected scaffold changes between patch releases.
New and Refined Helpers
Number::spell() and Number::ordinal()
use Illuminate\Support\Number;
Number::spell(42); // "forty-two"
Number::ordinal(3); // "3rd"
Number::ordinal(21); // "21st"
These are thin wrappers around PHP's NumberFormatter — no extra dependency, locale-aware via the locale argument.
Str::chopStart() / Str::chopEnd()
Str::chopStart('https://example.com', 'https://'); // "example.com"
Str::chopEnd('report.csv', '.csv'); // "report"
Clean replacements for the ltrim/rtrim + manual prefix pattern you have written a hundred times.
once() helper
function expensiveComputation(): int
{
return once(fn () => /* runs exactly once per request lifecycle */ 42);
}
once() memoises the return value of a closure for the duration of the request (or Octane worker tick). It is backed by Illuminate\Support\Once and is safe across repeated calls from different call sites.
Upgrade Checklist
For teams moving from Laravel 11:
- Run
php artisan abouton L11 first; note any custom providers. - Update
composer.json:"laravel/framework": "^12.0". - Check your
bootstrap/app.php— if you registered middleware in a customKernel, migrate it to the fluent API:
// bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
->withMiddleware(function (Middleware $middleware) {
$middleware->append(\App\Http\Middleware\TrustProxies::class);
})
->create();
- Search for
Illuminate\Http\Middleware\TrustHosts— it is now enabled by default; remove duplicate registrations. - Run
php artisan config:clear && php artisan cache:clearbefore deploying. - Review the official upgrade guide for any package-specific notes (Sanctum, Passport, Telescope all have L12-compatible releases).
Should You Upgrade Now?
If you are on L11 and your app is stable, upgrading is low-risk. The breaking changes are narrow and well-documented. New projects should start on L12 immediately to benefit from the cleaner skeleton and updated starter kits.
Key Takeaways
- The skeleton is leaner —
Kernel.phpis gone, providers are consolidated. - Three official starter kits (
react,vue,livewire) with optional WorkOS auth. Str::chopStart(),Str::chopEnd(),Number::spell(),Number::ordinal(), andonce()are worth adopting immediately.- Upgrading from L11 is straightforward; the main work is migrating any custom
Kernelmiddleware tobootstrap/app.php. - Pin starter kit versions in CI to avoid scaffold drift.