Laravel 12: What Changed and Why It Matters

S
Samuel Kimani
January 25, 2026 1 min read

The New File Structure

Laravel 12 continues the streamlining that started in Laravel 11. The HTTP Kernel is gone — middleware configuration moves to bootstrap/app.php with a fluent, declarative API. Console commands auto-register. Service providers live in bootstrap/providers.php.

Middleware Made Simple

Instead of registering middleware in a Kernel class, you configure it in bootstrap/app.php using Application::configure()->withMiddleware(). Global middleware, route middleware, and middleware groups are all declared in one place. It's cleaner, more discoverable, and harder to misconfigure.

Eloquent Improvements

Casts can now be defined as a method instead of a property, giving you access to dependency injection and dynamic logic. Native eager loading limits mean you can finally do $query->latest()->limit(10) without third-party packages.Column modifications in migrations now require specifying all attributes — anything you omit gets dropped. This is a breaking change worth noting if you're migrating from earlier versions.

Our Take

We run Laravel 12 across all client projects. The streamlined structure reduces boilerplate, which means our AI coding sessions produce cleaner code with fewer files to manage. The framework continues to be the best choice for PHP web applications.

Need software built?

Tell us what you need. We respond within 24 hours with a realistic quote.