Laravel 12: Features, Helpers &amp; Upgrade Notes | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Laravel 12: New Features, Helpers, and Practical Upgrade Notes        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)

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

  #laravel   #laravel-12   #upgrade   #php  

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

     23 Jun 2026      4 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

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

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-12-new-features-helpers-and-practical-upgrade-notes&text=Laravel+12%3A+New+Features%2C+Helpers%2C+and+Practical+Upgrade+Notes) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-12-new-features-helpers-and-practical-upgrade-notes) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  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. 

      Q02  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. 

      Q03  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. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Laravel Reverb WebSocket Presence Channels: Private State Without a Redis Bottleneck](https://cdn.msaied.com/285/4691db3cdad180d19e485611a8732087.png) laravel reverb websockets 

### Laravel Reverb WebSocket Presence Channels: Private State Without a Redis Bottleneck

Presence channels in Laravel Reverb let you track who is online without hammering Redis on every heartbeat. He...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 24 Jun 2026     4 min read  

  Read    

 ](https://msaied.com/articles/laravel-reverb-websocket-presence-channels-private-state-without-a-redis-bottleneck) [ ![Typed Enums as First-Class Domain Citizens in Laravel with PHP 8.3](https://cdn.msaied.com/282/71a8fc3e4cf4239b1bf6d38d57e0b985.png) laravel php8.3 enums 

### Typed Enums as First-Class Domain Citizens in Laravel with PHP 8.3

Go beyond simple enum labels. Learn how to attach behaviour, implement interfaces, and use backed enums as Elo...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 24 Jun 2026     3 min read  

  Read    

 ](https://msaied.com/articles/typed-enums-as-first-class-domain-citizens-in-laravel-with-php-83) [ ![RAG in Laravel: pgvector, Embeddings, and Retrieval-Augmented Generation in Practice](https://cdn.msaied.com/281/8d2ac57c0e69d3ff9f1e68faf0e4d10c.png) laravel ai pgvector 

### RAG in Laravel: pgvector, Embeddings, and Retrieval-Augmented Generation in Practice

Build a production-ready RAG pipeline in Laravel using pgvector, OpenAI embeddings, and a clean retrieval laye...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 24 Jun 2026     4 min read  

  Read    

 ](https://msaied.com/articles/rag-in-laravel-pgvector-embeddings-and-retrieval-augmented-generation-in-practice) 

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

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
