The Transition to Laravel 13 Laravel 13 arrived in March with a clear message: stability is a feature, not a failure. Following the precedent set by previous versions, this major release prioritizes consistency over disruptive shifts. Developers will find an environment that feels familiar, yet refined, allowing for a seamless transition that doesn't break existing workflows. Mandatory Platform Upgrades The most significant change is the requirement for PHP 8.3. This move ensures the framework utilizes modern language performance and security improvements. Simultaneously, Laravel 11 has officially reached its end-of-life for security fixes. Maintaining an outdated version now presents a genuine risk to production applications, making the jump to version 13 a necessity for security-conscious teams. Refined AI and API Tooling While some features were visible in the late stages of version 12, version 13 marks their formal, stable debut. The Laravel AI SDK is now considered a production-ready component, signaling a heavy investment in the future of intelligent applications. Additionally, JSON:API resources and semantic vector search—specifically for PostgreSQL—provide powerful tools for building standardized APIs and search experiences without reaching for external dependencies. Visual and Structural Changes Developers will notice an increased use of **PHP attributes** for middleware and authorization. This shifts logic from method calls directly into metadata, cleaning up controller structures. Furthermore, the Laravel installer now triggers Laravel Boost after npm commands, ensuring the AI agent can intelligently detect the frontend environment before offering suggestions. These refinements prove that even a "boring" update can significantly polish the daily developer experience.
Laravel 11
Products
- Mar 18, 2026
- Jan 30, 2026
- Dec 23, 2025
- Nov 20, 2025
- Oct 1, 2025
2024 didn't just feel like another year in the Laravel ecosystem; it felt like a tectonic shift in how we approach web development. As the year winds down, reflecting on the sheer volume of shipping that occurred reveals a framework—and a community—that is no longer just content with being the best PHP option. Instead, it is actively competing for the title of the best overall web development experience on the planet. From the refinement of the core skeleton in Laravel 11 to the explosive growth of Filament and the birth of Inertia 2.0, the pieces of the puzzle are clicking into place with a satisfying snap. This isn't just about code; it's about the developer experience, the culture, and the tools that make us feel like true artisans. Let's look at the biggest milestones that defined this year and what they mean for the future of our craft. Rethinking the Skeleton: The Radical Simplicity of Laravel 11 When Laravel 11 dropped in early 2024, it brought with it a moment of collective breath-holding. The team decided to perform major surgery on the project's directory structure, aiming for a streamlined, "no-fluff" skeleton. For years, newcomers were greeted by a mountain of folders and files that, while powerful, often sat untouched in 95% of applications. Nuno Maduro and the core team recognized that this friction was a tax on the developer's mind. By moving middleware and exception handling configuration into the `bootstrap/app.php` file and making the `app/` directory significantly leaner, they redefined what it means to start a new project. This shift wasn't just about aesthetics. It was a functional bet on the idea that configuration should be centralized and that boilerplate belongs hidden unless you explicitly need to modify it. While some veterans were initially skeptical of the "gutted" feel, the consensus has shifted toward appreciation. The new structure forces you to be more intentional. When you need a scheduler or a custom middleware, you use a command to bring it to life, rather than stumbling over a file that's been there since day one. This "opt-in" complexity is a masterclass in software design, proving that Laravel can evolve without losing its soul or breaking the backward compatibility that businesses rely on. Inertia 2.0 and the JavaScript Marriage The release of Inertia 2.0 represents a maturation of the "modern monolith" approach. For a long time, the Laravel community felt split between the Livewire camp and the SPA camp. Inertia.js bridged that gap, but version 2.0 took it to a level where the lines between the backend and frontend are almost invisible. The introduction of deferred props and prefetching on hover changes the performance game for complex dashboards like Laravel Cloud. Nuno Maduro and the team dog-fooded these features while building the Cloud platform, realizing that a UI needs to feel "snappy" and immediate. When you hover over a link in an Inertia 2.0 app, the data for that next page can be fetched before you even click. This isn't just a parlor trick; it’s a fundamental improvement in perceived latency. Moreover, the ability to handle multiple asynchronous requests and cancel redundant ones puts Inertia on par with the most sophisticated JavaScript meta-frameworks, all while keeping the developer safely ensconced in their familiar Laravel routes and controllers. The Testing Renaissance: Pest 3 and Mutation Testing Testing has historically been the "vegetables" of the programming world—something we know we should do but often avoid. Pest 3 changed that narrative in 2024. Nuno Maduro pushed the boundaries of what a testing framework can do, moving beyond simple assertions into the realm of architectural testing and mutation testing. Mutation testing is particularly revolutionary for the average developer. It doesn't just tell you if your tests pass; it tells you if your tests are actually *good*. By intentionally introducing bugs (mutations) into your code and seeing if your tests catch them, Pest 3 exposes the false sense of security that high code coverage often provides. This level of rigor was previously reserved for academics or high-stakes systems, but Nuno made it accessible with a single flag. Coupled with architectural presets that ensure your controllers stay thin and your models stay where they belong, Pest has transformed testing from a chore into a competitive advantage. Filament and the Death of the Boring Admin Panel If 2024 belonged to any community-led project, it was Filament. The "rise of Filament" isn't just about a tool; it's about the democratization of high-end UI design. Developers who lack the time or inclination to master Tailwind CSS can now build admin panels and SaaS dashboards that look like they were designed by a Tier-1 agency. The core strength of Filament lies in its "Panel Builder" philosophy. It isn't just a CRUD generator; it’s a collection of highly typed, composable components that handle everything from complex form logic to real-time notifications via Livewire. Josh Cirre and others have noted how Filament has fundamentally changed the economics of building a SaaS. What used to take weeks of frontend labor now takes hours. The community surrounding Filament has exploded, with hundreds of plugins and a contributors' list that rivals major open-source projects. It proves that the Laravel ecosystem is a fertile ground where a well-designed tool can gain massive traction almost overnight, provided it respects the "Artisan" ethos of clean code and excellent documentation. Observability and the Nightwatch Horizon As we look toward 2025, the buzz surrounding Nightwatch is impossible to ignore. Building on the foundation of Laravel Pulse, Nightwatch aims to bring professional-grade observability to the masses. The team, including Jess Archer and Tim MacDonald, is tackling the massive data ingestion challenges associated with monitoring high-traffic applications. By leveraging ClickHouse, the Nightwatch team is creating a system that can track specific user behaviors—like who is hitting the API the hardest or which specific queries are slowing down a single user's experience. This level of granularity changes the developer's mindset from "I hope the server is okay" to "I know exactly why this specific user is experiencing lag." It's the final piece of the professional devops puzzle for Laravel shops, moving observability from a third-party luxury to a first-party standard. Breaking the Barrier: The First-Party VS Code Extension For a long time, the Laravel experience was slightly fragmented depending on your editor. PHPStorm with the Laravel Idea plugin was the undisputed king, but it came at a cost. In 2024, the release of the official Laravel VS Code Extension changed the math for thousands of developers. Created by Joe Dixon, this extension brings intelligent route completion, blade view creation, and sophisticated static analysis to the world's most popular free editor. This move was about lowering the barrier to entry. If you're a JavaScript developer curious about PHP, you shouldn't have to learn a new IDE just to be productive. The massive adoption—over 10,000 installs in the first few hours—underscores the demand for high-quality, free tooling. It's a move that ensures Laravel remains the most welcoming ecosystem for the next generation of coders. Conclusion: The Road to 2025 As we look back on Laracon US in Dallas and the impending arrival of PHP 8.4, it's clear that Laravel is in its prime. We are no longer just a framework; we are a complete platform that handles everything from the first line of code to the final deployment on Laravel Cloud. The momentum is undeniable. Whether you're excited about property hooks in PHP 8.4 or the new starter kits coming in Laravel 12, there has never been a better time to be a web developer. The tools are sharper, the community is bigger, and the future is bright. Stay curious, keep shipping, and we'll see you in the new year.
Dec 19, 2024Overview Fetching the same data multiple times within a single request is a common performance bottleneck. Whether you are retrieving a user profile for the header, a sidebar, and a footer, or fetching a list of featured items, redundant database queries waste resources. The `once` helper in Laravel provides an elegant solution for in-memory memoization. It ensures that a given callback is executed exactly once during the lifecycle of a request, returning the cached result for all subsequent calls. Prerequisites To follow this tutorial, you should have a baseline understanding of PHP and the Laravel framework. Familiarity with anonymous functions (closures) and static methods will help you grasp the implementation details. You will need Laravel 11 or higher to use this as a built-in feature. Key Libraries & Tools * **Laravel Framework**: The primary PHP framework providing the helper. * **Spatie once**: The original package that inspired this native implementation. * **Tinkerwell**: An excellent code runner for testing Laravel snippets in real-time. Code Walkthrough Suppose we have a `Podcast` model with a static method that fetches featured shows via an action class. Without optimization, every call triggers a new query. ```python // Before: Every call hits the database public static function featured() { return (new GetFeaturedPodcastsAction)->execute(); } ``` To optimize this, wrap the logic in the `once` helper. The helper accepts a `callable` and stores the result based on the calling context. ```python // After: Optimized with the once helper public static function featured() { return once(fn () => (new GetFeaturedPodcastsAction)->execute()); } ``` When the application executes this code three times in one request, Laravel runs the inner logic on the first attempt, caches the return value, and serves that cached value for calls two and three. This eliminates redundant database overhead instantly. Syntax Notes The `once` helper uses the object instance or class and the method name to create a unique cache key. It relies on a closure (`fn () => ...`) to encapsulate the logic you want to memoize. This pattern is much cleaner than manually checking if a property is null before assigning a value. Tips & Gotchas Remember that `once` only persists for the duration of the current HTTP request. If you need to store data across multiple requests or for hours at a time, you must use Laravel's standard `Cache` facade. Additionally, be mindful of state; if the underlying data changes mid-request, `once` will still return the original result until the request ends.
May 6, 2024Refined Enum Queries in Eloquent Laravel has long supported PHP enums for casting, but a significant friction point remained when querying databases. Previously, while you could cast a model attribute to an enum, passing that same enum directly into a `where` clause often led to unexpected failures. The framework now handles this natively. You can pass a backed enum case directly into Eloquent query methods, and it correctly resolves the underlying value. This eliminates the need for manual `->value` calls, making your repository and service layers significantly cleaner. Automatic Password Re-hashing Security standards change, and Laravel 11 now makes it easier to keep up without forcing a mass password reset. The framework has updated its default BCrypt work factor from 10 rounds to 12, matching PHP 8.4 standards. The real magic happens during authentication: if a user logs in and the framework detects their stored hash uses an outdated work factor, it automatically re-hashes the password using the new configuration. This ensures your user data stays secure against modern brute-force hardware without any manual migration scripts. Capturing Metadata with Context Modern applications involve complex request lifecycles—controllers, jobs, and listeners often need access to the same metadata. The new Context facade provides a centralized way to store information that persists across the entire request. By adding a simple middleware, you can inject data like request IDs, current URLs, or authenticated user IDs into the global context. This data is automatically appended to log messages, providing an incredible audit trail for debugging without cluttering your code with repetitive log context arrays. Beyond Logging: Hidden Context The Context feature isn't just for logs. Developers can store hidden data that doesn't appear in logs but remains accessible throughout the execution thread. This is perfect for passing tenant IDs in multi-tenant apps or tracking internal execution flags. By centralizing this metadata, you reduce the need for passing variables through deep call stacks, keeping your method signatures focused on their primary logic.
Mar 28, 2024The PHP world just shifted. With the release of Laravel 11, the framework undergoes its most significant structural renovation in years. This isn't just a handful of new methods; it's a complete rethink of how a modern web application should feel from day one. By stripping away the noise, the framework invites developers to focus on their unique logic rather than boilerplate management. The Great Structural Purge Taylor Otwell has moved the framework toward a lean, mean architecture. The massive `app` folder is a shadow of its former self. GONE are the HTTP and Console kernels. The middleware folder—which used to house nine default files—has vanished. Even the providers directory now only holds a single `AppServiceProvider`. This isn't about losing functionality; it's about moving configuration to the `bootstrap/app.php` file, where you can fluently define your middleware and exception handling without jumping between dozens of files. Intelligent New Defaults Starting a new project is faster than ever. Laravel 11 now defaults to SQLite for local development. This means you can run a migration immediately after installation without configuring a local MySQL instance or managing Docker containers. Furthermore, Pest is now the default testing framework, bringing a modern, functional syntax to your test suites right out of the box. Built-in Health Monitoring A new `health` argument in the routing configuration provides a dedicated endpoint for monitoring. This standardizes how third-party services check if your application is alive. It even dispatches a health event, allowing you to hook in custom checks for your database, cache, or external API dependencies without building a custom controller from scratch. Graceful Key Rotation Security updates used to be painful. If you rotated your application key, every logged-in user faced immediate session termination and cookie decryption errors. Laravel 11 introduces graceful encryption key rotation. You can now define previous keys that the application will check if the current key fails to decrypt a value. It keeps your users logged in while you tighten security. Testing the Queue with Precision Testing whether a job was released, deleted, or delayed used to require complex fakes and stubs. The new `withQueueInteractions` method changes the game. It allows for clean, expressive assertions on queue behavior, ensuring your background logic is as robust as your HTTP endpoints. It's a massive win for developers who prioritize high test coverage.
Mar 12, 2024Overview Building full-stack web applications requires a delicate balance between powerful backend logic and snappy, interactive frontends. Laravel continues to dominate this space by prioritizing developer experience and productivity. The latest advancements—ranging from a radical rethinking of the framework skeleton in **Laravel 11** to the introduction of single-file functional components in **Laravel Volt**—aim to remove the traditional friction of web development. This guide explores how these new tools streamline the path from a blank terminal to a high-performance production application. Prerequisites To get the most out of these new features, you should have a firm grasp of the following: * **PHP 8.2+**: Many of the new features, especially in Laravel 11, rely on modern PHP type-hinting and syntax. * **Blade Templating**: Understanding the basics of Blade components and directives. * **Eloquent ORM**: Familiarity with how Laravel handles database models and relationships. * **Command Line Interface (CLI)**: Comfort using Artisan commands for scaffolding and migrations. Key Libraries & Tools * Laravel Herd: A zero-dependency, lightning-fast PHP development environment for macOS that bypasses Homebrew. * Laravel Folio: A page-based routing system that eliminates the need for manual route definitions in `web.php`. * Laravel Volt: An add-on for Livewire 3 that allows for single-file, functional PHP/Blade components. * Laravel 11: The upcoming major version of the framework featuring a minimalist application skeleton. The Laravel 11 Skeleton: Minimalist by Design Laravel 11 introduces a streamlined directory structure that removes the "bloat" often associated with enterprise-grade frameworks. The goal is a light, lean, and modern starting point where you only interact with the files you actually need. The Vanishing Middleware and Kernel One of the most jarring changes is the removal of the `app/Http/Middleware` directory and the `Kernel.php` files. In previous versions, the framework shipped with nine default middlewares. In Laravel 11, these are moved into the framework core, though they remain fully configurable. Instead of a kernel, you now configure your application middleware and routing within the `bootstrap/app.php` file using a fluent, functional interface: ```php ->withMiddleware(function (Middleware $middleware) { $middleware->web(append: [ \App\Http\Middleware\LaraconMiddleware::class, ]); }) ``` Models and Method-Based Casts Eloquents models are also seeing a syntax upgrade. While property-based casting (the `$casts` protected property) still works, Laravel 11 promotes method-based casts. This allows you to call methods directly within the cast definition, providing better IDE support and more expressive code. ```php protected function casts(): array { return [ 'options' => AsEnumCollection::of(UserOption::class), ]; } ``` Page-Based Routing with Laravel Folio Laravel Folio provides an alternative to the traditional routing system. Inspired by frameworks like Next.js, it uses the file system to determine your application's routes. If a file exists at `resources/views/pages/about.blade.php`, it is automatically accessible at `/about`. Dynamic Segments and Route Model Binding Folio handles dynamic parameters using a bracket syntax in the filename. To bind a route to a specific User model, you would name your file `[User].blade.php`. Folio automatically detects this and performs route model binding behind the scenes. ```php // resources/views/pages/users/[User].blade.php <div> <h1>User Profile</h1> <p>Name: {{ $user->name }}</p> </div> ``` For more complex needs, Folio supports **middleware** declaration directly inside the Blade file. By using a `<?php` block at the top of the template, you can assign middleware like `auth` or `can` without ever touching a separate routes file. Single-File Interactivity with Laravel Volt Laravel Volt is perhaps the most significant shift in how Livewire components are written. It allows for "code co-location," where the logic of a component (PHP) lives in the same file as the markup (Blade). The Functional API Volt utilizes a functional API to define state, actions, and validation. Here is a look at a simple counter component written entirely within a single `.blade.php` file: ```php <?php use function Laravel\Volt\{state}; state(['count' => 0]); $increment = fn () => $this->count++; ?> <div> <h1>{{ $count }}</h1> <button wire:click="increment">+</button> </div> ``` This approach eliminates the context-switching required when bouncing between a `Component.php` class and a `component.blade.php` template. It supports the full Livewire feature set, including lifecycle hooks, validation rules, and even URL query string synchronization. Anonymous Components One of Volt's most powerful features is the `volt` directive. It allows you to turn a fragment of a standard Blade page into a reactive Livewire component without creating a separate file in the `Livewire` directory. This is ideal for small pieces of interactivity, such as a live search box or a polling notification list. Syntax Notes * **Trailing Closures**: Many new Laravel APIs utilize trailing closures in their configuration files to keep the syntax clean. * **Wildcard Directories**: In Laravel Folio, use `[...]` for multi-segment parameters and `[Model:slug]` for scoped child binding. * **State Management**: In Laravel Volt, the `state()` function accepts an associative array to initialize component properties. Practical Examples Implementing a Live Search with Volt By combining the `state` and `provide` functions, you can create a high-performance search interface. Using the `->url()` method on the state ensures that the search term stays in the browser's address bar, allowing users to share specific search results. ```php <?php use App\Models\User; use function Laravel\Volt\{state, provide}; state(['search' => ''])->url(); provide(['users' => fn () => User::where('name', 'like', "%{$this->search}%")->get() ]); ?> <div> <input wire:model.live="search" type="text" placeholder="Search users..."> <ul> @foreach($users as $user) <li>{{ $user->name }}</li> @endforeach </ul> </div> ``` Tips & Gotchas * **PHP Version Matters**: Laravel Herd makes switching PHP versions trivial, but ensure your production environment matches the version you used during development to avoid type-hinting errors. * **Folio vs. Traditional Routes**: You don't have to choose one. You can use Laravel Folio for simple marketing pages and traditional routes/controllers for complex business logic. * **Validation in Volt**: Always call `$this->validate()` inside your action closures if you have defined `rules()` at the top of your Volt component. * **Skeleton Upgrades**: Upgrading to Laravel 11 does not require you to adopt the new minimalist skeleton. Your existing Laravel 10 structure will work perfectly fine after the upgrade.
Jul 24, 2023