Laravel 12: Features, Helpers &amp; Upgrade Notes | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. Laravel 12: New Features, Helpers, and Practical Upgrade Notes

 Laravel 12: New Features, Helpers, and Practical Upgrade Notes
===============================================================

 Laravel 12 ships with streamlined application scaffolding, first-class support for typed route model binding improvements, and a cleaner service provider bootstrap path. Here is what actually matters for production apps.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 31 Aug 2026 · Updated 31 Aug 2026 · 3 min read

ShareCopy linkCopied

 ![Laravel 12: New Features, Helpers, and Practical Upgrade Notes](https://cdn.msaied.com/613/3ae9f2d6a41ea381d43aeed4c462ae97.png) 

  On this page +1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Starter Kit Overhaul](#starter-kit-overhaul)
3. [Application Bootstrap Cleanup](#application-bootstrap-cleanup)
4. [Typed Route Model Binding Improvements](#typed-route-model-binding-improvements)
5. [Removed Deprecations Worth Noting](#removed-deprecations-worth-noting)
6. [Minimum PHP Version](#minimum-php-version)
7. [Upgrade Checklist](#upgrade-checklist)
8. [Key Takeaways](#key-takeaways)

 What Actually Changed in Laravel 12
-----------------------------------

Laravel 12 is a focused release. Rather than introducing sweeping new subsystems, it tightens existing APIs, removes long-deprecated paths, and ships opinionated starter kits that reflect how the community actually builds apps today. If you are running Laravel 11 on PHP 8.2+, the upgrade is low-friction — but a handful of changes will bite you if you skip the release notes.

---

### Starter Kit Overhaul

The most visible change is the replacement of the old Breeze and Jetstream scaffolding with a unified `laravel new` experience. The new stacks are:

- **React + Inertia** (TypeScript-first)
- **Vue + Inertia** (TypeScript-first)
- **Livewire** (Volt or class-based)
- **API-only** (no frontend)

The installer now asks which stack you want and wires everything — Vite config, auth scaffolding, and Pest — in one pass. There is no separate `breeze:install` step.

```bash
laravel new my-app
# Prompts: stack, testing framework, git init

```

Existing projects are unaffected; the starter kits are only relevant at project creation time.

---

### Application Bootstrap Cleanup

Laravel 12 removes the `Http/Kernel.php` and `Console/Kernel.php` files that were already deprecated in Laravel 11. If you upgraded from Laravel 10 and kept those files, they will now be ignored entirely — but any customisation inside them will silently disappear.

**Action required:** Audit your kernels before upgrading. Move any custom middleware registration to `bootstrap/app.php`:

```php
// bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->append(\App\Http\Middleware\EnforceJsonResponse::class);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        $exceptions->render(fn (\App\Exceptions\DomainException $e, Request $r) =>
            response()->json(['error' => $e->getMessage()], 422)
        );
    })
    ->create();

```

---

### Typed Route Model Binding Improvements

Laravel 12 makes implicit route model binding respect PHP 8.x union types and intersection types on controller method signatures. Previously, a union-typed parameter would fall back to the default resolver. Now the container inspects the concrete type and resolves accordingly.

```php
// Before Laravel 12: union type caused silent fallback
public function show(Post|Page $resource): Response
{
    // $resource was always the raw route segment string
}

// Laravel 12: resolves the first bindable type found in the union
public function show(Post|Page $resource): Response
{
    // $resource is a hydrated Eloquent model
}

```

This is opt-in via the `Illuminate\Routing\Contracts\BindingRegistrar` interface on your model. If neither type implements it, the old behaviour is preserved.

---

### Removed Deprecations Worth Noting

| Removed | Replacement | |---|---| | `Route::prefix()` chained on group closures without array | Pass options array directly | | `$this->middleware()` in controllers (constructor style) | Use `#[Middleware]` attribute | | `Str::replaceArray()` | `Str::replaceMatches()` or native `str_replace()` | | `assertExactJson` strict key ordering | `assertExactJsonStructure` |

---

### Minimum PHP Version

Laravel 12 requires **PHP 8.2**. PHP 8.1 is dropped. If you are still on 8.1, upgrade PHP first — the language changes (readonly classes, `never` return type, `DNF` types) are worth it independently.

---

### Upgrade Checklist

- Run `composer require laravel/framework:^12.0` and fix any immediate constraint conflicts.
- Delete `app/Http/Kernel.php` and `app/Console/Kernel.php` after migrating their contents.
- Search for `Str::replaceArray` and `$this->middleware(` in controllers.
- Run `php artisan route:list` and confirm no routes silently broke.
- Execute your full Pest suite — binding changes can surface as 404s in feature tests.

---

### Key Takeaways

- The kernel files are gone; `bootstrap/app.php` is the single configuration surface.
- Starter kits are rebuilt from scratch — existing projects are unaffected.
- Union-typed route model binding now works correctly without a workaround.
- PHP 8.2 is the floor; plan your server upgrade before touching `composer.json`.
- The removed deprecations are small but silent — a thorough test suite is your safety net.

- [laravel](https://www.msaied.com/public/articles?search=laravel)
- [laravel-12](https://www.msaied.com/public/articles?search=laravel-12)
- [upgrade](https://www.msaied.com/public/articles?search=upgrade)
- [php](https://www.msaied.com/public/articles?search=php)

 Frequently asked questions 
---------------------------

  Do I need to rebuild my existing Laravel 11 app to use the new starter kits in Laravel 12?No. The new starter kits only apply when you create a fresh project with `laravel new`. Upgrading an existing app to Laravel 12 does not touch your frontend scaffolding.

   What happens if I upgrade to Laravel 12 but still have Http/Kernel.php in my project?The file is silently ignored. Any custom middleware or exception handling registered there will stop working. You must migrate that logic to bootstrap/app.php before upgrading.

   Is the union-type route model binding change backwards-compatible?Yes, with a caveat. If neither type in the union implements the binding contract, the old behaviour is preserved. The change only activates when at least one type is a bindable Eloquent model, so existing routes are safe.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com/public#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleLaravel Octane + FrankenPHP: Persistent Services, Shared State, and Safe Singletons](https://www.msaied.com/public/articles/laravel-octane-frankenphp-persistent-services-shared-state-and-safe-singletons) [Next articleLivewire v4.4.3 Released: Bug Fixes, Performance Improvements &amp; Alpine 3.17.1](https://www.msaied.com/public/articles/livewire-v443-released-bug-fixes-performance-improvements-alpine-3171)  

   On this page
-------------

1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Starter Kit Overhaul](#starter-kit-overhaul)
3. [Application Bootstrap Cleanup](#application-bootstrap-cleanup)
4. [Typed Route Model Binding Improvements](#typed-route-model-binding-improvements)
5. [Removed Deprecations Worth Noting](#removed-deprecations-worth-noting)
6. [Minimum PHP Version](#minimum-php-version)
7. [Upgrade Checklist](#upgrade-checklist)
8. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
