DEV Community

Cover image for Laravel 12: What’s New and Why It’s Awesome!
varzoeaa
varzoeaa

Posted on • Edited on

Laravel 12: What’s New and Why It’s Awesome!

Hey there, Laravel fan! 🎉 Laravel 12 has arrived, and it’s packed with exciting updates that make your life as a developer even easier. But don’t worry, no crazy changes that will break your app! Let’s dive in and see what’s new.

⚡ Say Hello to Brand New Starter Kits!

Imagine you’re about to build a brand-new Laravel app. Wouldn’t it be amazing if Laravel already set up the frontend for you? Well, guess what? Laravel 12 gives you shiny new starter kits for React, Vue, and Livewire!

These starter kits come pre-packaged with awesome tools:

  • React & Vue Kits → Powered by Inertia 2, TypeScript, Tailwind CSS, and shadcn/ui.

  • Livewire Kit → Uses the sleek Flux UI and Laravel Volt for fast, dynamic interfaces.

These kits already include authentication (login, registration, password reset, email verification), so you don’t have to build it from scratch.

Oh, and there’s an extra cool version that supports social logins, passkeys, and Single Sign-On (SSO) through WorkOS AuthKit. It’s free for apps with under 1 million users!

⛔ What about Breeze and Jetstream? Laravel’s old starter kits are retiring, so these new kits are the way forward.

first

🔄 No Major Breakage—Just Smooth Sailing!

Upgrading to Laravel 12 is easy! Unlike some past versions, Laravel 12 keeps breaking changes to a minimum. That means you can upgrade without worrying about your existing code suddenly crashing.

Laravel 12 is all about improving your developer experience without forcing you to rewrite everything. Simple, right?

🔧 Keeping Things Fresh with Upstream Updates

Laravel 12 also updates important dependencies to keep things secure and up-to-date. While you might not see these changes directly, they help your app run faster, smoother, and safer.

second

🆕 Other Exciting Changes in Laravel 12

🏎️ Faster String Matching

The Str::is() method now supports multiline string matching, making pattern matching way more powerful.

📌 Better Schema Dumps for MariaDB

Laravel 12 now natively supports MariaDB schema dumping.

🌍 New ResponseFactory::streamJson() Method

Want to send a huge JSON response efficiently? Laravel 12 introduces streamJson(), which helps in handling large JSON responses without using too much memory.

🔢 Improved Numeric Key Handling in Validation

Laravel 12 preserves numeric keys at the first level of validation arrays.

🔑 UUID v7 for Model IDs

Laravel now uses UUID v7 for model IDs, making them more unique, scalable, and efficient!

⚡ Faster Hashing with xxhash

Laravel replaces md5 with xxhash for hashing operations.

🔀 Improved mergeIfMissing() for Arrays

You can now merge nested arrays more effectively when handling complex data structures.

📋 Better Query Chunking

Chunking now respects user-defined limits and offsets, making bulk data operations more precise.

third

🚀 Why Laravel 12 is a Game-Changer

So, why should you be excited about Laravel 12? Here’s the TL;DR:

  • New Starter Kits that set up your frontend in seconds.
  • Minimal Breaking Changes so upgrading is a breeze.
  • Performance Boosts and better security.
  • Better Authentication Options with social logins and SSO.

In short, Laravel 12 makes it faster, easier, and more fun to build apps. So what are you waiting for? Go update your projects and start coding!

Top comments (3)

Collapse
 
bnl profile image
Ben

Why is thing called "WorkOS" being foisted on me?

Collapse
 
varzoeaa profile image
varzoeaa

It makes authentication easier. Obviously if you just need a basic login system you should choose a different starter kit, but before this if you wanted to integrate social logins Socialite was the go-to but now this unifies that with Oauth, SSO like you dont have to manually set up Oauth for Google or Github for example. You can handle everything at one place. Also additional features like log in without password and with a passkey, otherwise it would require more setups to work.

Collapse
 
programmingmindset profile image
Programming Mindset

Awesome article. You have given a strong effort to write this. Here I also written an article regarding laravel 12