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-party starter kits built on React/Vue/Livewire, and a cleaner bootstrap path. Here is what actually changed and how to upgrade without surprises.

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

ShareCopy linkCopied

 ![Laravel 12: New Features, Helpers, and Practical Upgrade Notes](https://cdn.msaied.com/478/117fb4792b77da2d5ae106048c5e70a7.png) 

  On this page +1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Starter Kits as First-Party Packages](#starter-kits-as-first-party-packages)
3. [Bootstrap and Application Structure](#bootstrap-and-application-structure)
4. [New and Refined Helpers](#new-and-refined-helpers)
5. [Number::spell() and Number::ordinal()](#codenumberspellcode-and-codenumberordinalcode)
6. [Str::chopStart() and Str::chopEnd()](#codestrchopstartcode-and-codestrchopendcode)
7. [once() Global Helper](#codeoncecode-global-helper)
8. [Upgrade Checklist](#upgrade-checklist)
9. [Takeaways](#takeaways)

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

Laravel 12 is a focused release. Rather than introducing sweeping architectural shifts, it refines the developer experience around application bootstrapping, ships opinionated starter kits as first-party packages, and adds a handful of ergonomic helpers. If you are already on Laravel 11, the upgrade surface is small — but a few spots will bite you if you skip the release notes.

---

Starter Kits as First-Party Packages
------------------------------------

The most visible change is that the React, Vue, and Livewire starter kits are now maintained as separate Composer packages under the `laravel/` namespace rather than being baked into the installer scaffolding.

```bash
# React + Inertia starter kit
composer create-project laravel/laravel my-app
cd my-app
php artisan install:api          # optional API scaffolding
php artisan install:broadcasting # optional Reverb scaffolding

# Then pull the starter kit of your choice
php artisan breeze:install react --typescript

```

This separation means the core framework no longer ships with any frontend opinion. The `laravel/breeze` and `laravel/jetstream` packages are updated to match, but the install commands remain familiar.

---

Bootstrap and Application Structure
-----------------------------------

Laravel 11 introduced the slimmed-down `bootstrap/app.php` that replaced `app/Http/Kernel.php` and `app/Console/Kernel.php`. Laravel 12 keeps that structure and makes it the only supported path — the legacy kernel stubs are removed from the installer entirely.

If you are upgrading from Laravel 10 directly, you must migrate to the new bootstrap style before targeting Laravel 12:

```php
// bootstrap/app.php — the only kernel you need
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->web(append: [
            \App\Http\Middleware\HandleInertiaRequests::class,
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })
    ->create();

```

---

New and Refined Helpers
-----------------------

### `Number::spell()` and `Number::ordinal()`

The `Number` facade gains two helpers that are genuinely useful for UI copy:

```php
use Illuminate\Support\Number;

Number::spell(3);        // 'three'
Number::ordinal(21);     // '21st'
Number::ordinal(2);      // '2nd'

```

### `Str::chopStart()` and `Str::chopEnd()`

These trim a specific prefix or suffix exactly once — cleaner than a regex for URL or path manipulation:

```php
use Illuminate\Support\Str;

Str::chopStart('/api/v1/users', '/api'); // '/v1/users'
Str::chopEnd('hello.blade.php', '.php'); // 'hello.blade'

```

### `once()` Global Helper

The `once()` helper memoizes the result of a closure for the lifetime of the request, scoped to the object instance when called inside a class:

```php
class PricingService
{
    public function baseRate(): float
    {
        return once(fn () => $this->fetchRateFromDatabase());
    }
}

```

This is particularly useful in Filament resources where the same computed value is accessed multiple times during a single render cycle.

---

Upgrade Checklist
-----------------

1. **Require Laravel 12** — update `composer.json` to `"laravel/framework": "^12.0"` and run `composer update`.
2. **Migrate legacy kernels** — if still on `app/Http/Kernel.php`, follow the Laravel 11 upgrade guide first.
3. **Check removed facades** — `Schema::connection()` shorthand behaviour was tightened; explicit connection calls are now required.
4. **Review middleware aliases** — any string-keyed middleware aliases registered in the old kernel must move to `bootstrap/app.php` via `$middleware->alias()`.
5. **Run your test suite** — Pest and PHPUnit both work; no test runner changes are required.
6. **Update `laravel/breeze` or `laravel/jetstream`** — pull the latest major version of whichever starter kit you use.

---

Takeaways
---------

- Laravel 12 is an evolutionary release; the upgrade from 11 is low-risk.
- Starter kits are now decoupled first-party packages, not installer scaffolding.
- The slim `bootstrap/app.php` is now the only supported bootstrap path.
- `Str::chopStart()`, `Str::chopEnd()`, `Number::ordinal()`, and `once()` are immediately useful in real applications.
- Upgrading from Laravel 10 requires an intermediate stop at Laravel 11 to adopt the new bootstrap structure.

- [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 
---------------------------

  Is the upgrade from Laravel 11 to Laravel 12 a large effort?No. If you are already on Laravel 11 with the slim bootstrap structure, the upgrade is mostly a version bump in composer.json plus reviewing any middleware alias registrations. The main work is for teams still on Laravel 10 who need to adopt the new bootstrap path first.

   Does the `once()` helper persist across requests in Laravel Octane?No. `once()` is scoped to the current object instance and is reset between requests in Octane because the object itself is typically re-instantiated per request. If you reuse a singleton across requests under Octane, you must clear memoized state manually in the request lifecycle hooks.

   Are the new starter kits compatible with Filament v3 and v4?The starter kits and Filament are independent. Filament manages its own panel routing and does not depend on Breeze or Jetstream. You can install a starter kit for your public-facing UI and run Filament panels alongside it without conflict.

   ![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 articleQueue-SQL: Run Mass Deletes and Updates Across Parallel Laravel Queue Jobs](https://www.msaied.com/public/articles/queue-sql-run-mass-deletes-and-updates-across-parallel-laravel-queue-jobs) [Next articlePostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Overhead](https://www.msaied.com/public/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-overhead)  

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

1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Starter Kits as First-Party Packages](#starter-kits-as-first-party-packages)
3. [Bootstrap and Application Structure](#bootstrap-and-application-structure)
4. [New and Refined Helpers](#new-and-refined-helpers)
5. [Number::spell() and Number::ordinal()](#codenumberspellcode-and-codenumberordinalcode)
6. [Str::chopStart() and Str::chopEnd()](#codestrchopstartcode-and-codestrchopendcode)
7. [once() Global Helper](#codeoncecode-global-helper)
8. [Upgrade Checklist](#upgrade-checklist)
9. [Takeaways](#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)
