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 skeletons, first-party starter kits built on React/Vue/Livewire, and several quality-of-life improvements. Here is what actually matters for production teams.

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

ShareCopy linkCopied

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

  On this page +1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Slimmer Application Skeleton](#slimmer-application-skeleton)
3. [First-Party Starter Kits](#first-party-starter-kits)
4. [New and Refined Helpers](#new-and-refined-helpers)
5. [Upgrade Checklist](#upgrade-checklist)
6. [Should You Upgrade Now?](#should-you-upgrade-now)
7. [Key Takeaways](#key-takeaways)

 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.php` is gone — middleware is now registered entirely in `bootstrap/app.php` (this started in L11 but L12 finalises the pattern).
- `app/Providers/BroadcastServiceProvider.php` and `app/Providers/EventServiceProvider.php` are no longer generated; their responsibilities live in `AppServiceProvider` or `bootstrap/app.php`.
- The `routes/channels.php` and `routes/console.php` files 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:

```bash
# 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 `--using` flag delegates to the kit's own installer. If your CI pipeline runs `laravel new`, pin the kit version explicitly to avoid unexpected scaffold changes between patch releases.

---

### New and Refined Helpers

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

```php
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()`

```php
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

```php
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:

1. **Run `php artisan about`** on L11 first; note any custom providers.
2. Update `composer.json`: `"laravel/framework": "^12.0"`.
3. Check your `bootstrap/app.php` — if you registered middleware in a custom `Kernel`, migrate it to the fluent API:

```php
// bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->append(\App\Http\Middleware\TrustProxies::class);
    })
    ->create();

```

4. Search for `Illuminate\Http\Middleware\TrustHosts` — it is now enabled by default; remove duplicate registrations.
5. Run `php artisan config:clear && php artisan cache:clear` before deploying.
6. Review the [official upgrade guide](https://laravel.com/docs/12.x/upgrade) 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.php` is gone, providers are consolidated.
- Three official starter kits (`react`, `vue`, `livewire`) with optional WorkOS auth.
- `Str::chopStart()`, `Str::chopEnd()`, `Number::spell()`, `Number::ordinal()`, and `once()` are worth adopting immediately.
- Upgrading from L11 is straightforward; the main work is migrating any custom `Kernel` middleware to `bootstrap/app.php`.
- Pin starter kit versions in CI to avoid scaffold drift.

- [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 upgrading from Laravel 11 to Laravel 12 a large effort?No. Laravel 12 has a small breaking-change surface. Most teams complete the upgrade in a few hours. The main task is migrating any custom HTTP Kernel middleware registrations to the fluent API in bootstrap/app.php.

   What is the `once()` helper and when should I use it?once() memoises a closure's return value for the lifetime of the current request or Octane worker tick. Use it to avoid redundant expensive computations — database lookups, heavy calculations — that are called from multiple places but should only run once per request.

   Do the new starter kits replace Laravel Breeze and Jetstream?The new --using flag kits are the spiritual successor to Breeze for React/Vue/Livewire stacks. Jetstream remains a separate package for teams that need its team management features. Breeze itself is updated to delegate to the new kits.

   ![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 Caching Strategies: Tags, Stampede Prevention, and Cache-Aside at Scale](https://www.msaied.com/public/articles/laravel-caching-strategies-tags-stampede-prevention-and-cache-aside-at-scale) [Next articleFilament v5 Preview: Schema Unification, Performance Shifts, and How to Prepare Now](https://www.msaied.com/public/articles/filament-v5-preview-schema-unification-performance-shifts-and-how-to-prepare-now)  

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

1. [What Actually Changed in Laravel 12](#what-actually-changed-in-laravel-12)
2. [Slimmer Application Skeleton](#slimmer-application-skeleton)
3. [First-Party Starter Kits](#first-party-starter-kits)
4. [New and Refined Helpers](#new-and-refined-helpers)
5. [Upgrade Checklist](#upgrade-checklist)
6. [Should You Upgrade Now?](#should-you-upgrade-now)
7. [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)
