--- title: "Laravel 11 Released: What’s New in v11? [New Features and Changes]" url: "https://www.krishaweb.com/blog/laravel-11-released/" date: "2024-03-14T14:27:39+00:00" modified: "2024-06-17T11:10:01+00:00" type: "Article" resource: "https://www.krishaweb.com/blog/laravel-11-released/" timestamp: "2024-06-17T11:10:01+00:00" author: name: "Nirav" url: "https://www.krishaweb.com" categories: - "Web Development" word_count: 1138 reading_time: "6 min read" summary: "The wait is over now!" description: "Laravel 11 is one of the most awaiting versions for a long time. There are many changes and new features to check out. Read on." keywords: "Laravel 11, Web Development" language: "en" schema_type: "Article" related_posts: - title: "Headless CMS Explained: Why It’s Ideal for AI-Powered Sites" url: "https://www.krishaweb.com/blog/headless-cms-benefits/" - title: "Webflow Development: How AI-Enhanced Builds Drive Measurable Results" url: "https://www.krishaweb.com/blog/webflow-development-services-ai-enhanced-builds/" - title: "WordPress vs Teachable: A Comprehensive Guide" url: "https://www.krishaweb.com/blog/wordpress-vs-teachable/" --- # Laravel 11 Released: What’s New in v11? [New Features and Changes] _Published: Thursday,March 14, 2024_ _Author: Nirav_ ![Laravel v11](https://d1hdtc0tbqeghx.cloudfront.net/wp-content/uploads/2024/03/14130207/Laravel-v11.png) ![Laravel v11](https://d1hdtc0tbqeghx.cloudfront.net/wp-content/uploads/2024/03/14130207/Laravel-v11.png)The wait is over now! Laravel 11 has been one of the most exciting versions for a long time. There are various major changes and new features announced with Laravel v11. Let’s explore them… ## What will You Get with Laravel v11? Overview of Changes and New Features As per the announcement by Taylor Otwell at Laracon EU, Laravel 11 introduces - minimal application structure, - uses SQLite by default, - implements health routing, - improves queue testing, - introduces new Artisan commands, and more. So stay tuned, we’ll cover all of these here… Along with Laravel 11, they had announced the release of Laravel Reverb. [Reverb](https://reverb.laravel.com/) is the newest addition to the Laravel ecosystem which is the first-party scalable WebSocket server. The purpose of its introduction was to provide robust real-time capabilities to the Laravel applications. We’ll cover this new addition later in this blog… ### 1. New Welcome Page Laravel v11 brings a new layout to the Welcome page. Check out the below images. Welcome page in both light and dark mode. ![](https://lh7-us.googleusercontent.com/_F-VkSsu_apeitk1reuj3owtHpA4azNMcPKFa5qd_P2YHsJec0_M-vGpXJcXk4EToTofXi-CJJ8nJDAOMsyz4Yzahgt8GkraoFpR5c_ReksPn161XgCJb8wtONNzasTUDbSBm2H9UJXTFqX_1fSWqew) ![](https://lh7-us.googleusercontent.com/aMSpNwr6TcDYwp74IrQwuW_vsuBhXtneOfwknRBW1ga6JXXoINfJqtUeTbgKZOCNnJCCfvxcefdz-Gyo34arR4yreXl1XbCWEmNQ8YvX6UD0IWjxTdeFDy2F4d0hxOHAR4WdGxGsSi3qLWg-LSaBEaE) ### 2. Minimal Application Structure Laravel 11 has introduced a minimal application structure for new Laravel applications, without requiring any change to existing applications. When you install a new Laravel project, the application’s folder structure will look like this… `
app/├── Http/│   └── Controllers/│       └── Controller.php├── Models/│   └── User.php└── Providers/    └── AppServiceProvider.phpbootstrap/├── app.php└── providers.phpconfig...
`Here are the removed folders: `app/Console`, `app/Exceptions`, `app/Http/Middleware` Routes, Middlewares, and Exceptions are now registered in the `bootstrap/app.php` file. This is how `bootstrap/app.php `file looks: `
use Illuminate\Foundation\Application;use Illuminate\Foundation\Configuration\Exceptions;use Illuminate\Foundation\Configuration\Middleware; return Application::configure(basePath: dirname(__DIR__))   ->withRouting(       web: __DIR__.'/../routes/web.php',       commands: __DIR__.'/../routes/console.php',       health: '/up',   )   ->withMiddleware(function (Middleware $middleware) {       //   })   ->withExceptions(function (Exceptions $exceptions) {       //   })->create();
`In addition, the routes folder has been simplified; the `api.php` and `channels.php` route files are no longer present by default since many applications do not require these files. ### 2. Removed Some Config Files At first, when Taylor Otwell introduced a minimal application structure, all `config/` files were removed. However, he didn’t totally agree with this change and introduced a minimal config version. If you look at the `config/ `folder of Laravel 10, you will find these files missing in Laravel 11: `
config/broadcasting.phpconfig/cors.phpconfig/hashing.phpconfig/sanctum.phpconfig/view.php
`But you can publish them manually, with this command: `
php artisan config:publish
`Or `
php artisan config:publish --all
`Also, some config values inside the existing files were removed in favour of automation inside the framework itself. Now, let’s talk about Sanctum and Broadcasting configuration… ### 3. API and Broadcasting: Installed Optionally Laravel 11 has no `routes/api.php` file, and Sanctum isn’t installed by default. You can install the API scaffolding with the `php artisan install:api` artisan command. When you run this artisan command, the `routes/api.php` file will be created and registered in the `bootstrap/app.php`, and Laravel Sanctum will be installed. You must only add the `Laravel\Sanctum\HasApiTokens` trait to the `User` Model. Similarly to the API changes, broadcasting also became installable: to prepare the application, you can use the `php artisan install:broadcast` artisan command. ### 4. Pest and SQLite are the New Defaults in the Laravel 11 With Laravel v11 you will get a few defaults set in your application. #### Default Testing Framework: Pest In the pole created by Taylor on X.com, people voted for Pest to be the default testing framework. So they changed it to Pest in Laravel v11. #### Default Database: SQLite In Laravel 11, the default database was changed to SQLite. So the new Laravel applications will use SQLite for database storage, as well as the database driver for Laravel’s session, cache, and queue. ### 5. New “make:” artisan command Laravel v11 comes with new `make:` artisan commands. Now, you can create enums, interfaces, and classes. `
php artisan make:enumphp artisan make:classphp artisan make:interface
` ### 6. Health Routing New Laravel 11 applications include a health routing directive, which instructs Laravel to define a simple health-check endpoint that may be invoked by third-party application health monitoring services or orchestration systems like Kubernetes. By default, this route is served at `'/up:'` ![](https://lh7-us.googleusercontent.com/GVuIc4gk3dPZxwd6VBslBT-n_R_RoqLub5pWwhS84ZIjqUHCIAvL7EaLblaoIP0ivXvR_rSmRqMQ_QBDlxyBFI9V5c-5GWvvputKEzCB5ocP8vI57rd2383Dh-yxN8Lti3n_YKO8x89E-1yjtstHodw) ### 7. Dumpable Trait Laravel 11 introduces a new `Dumpable` trait. It is intended to replace the current `dd()` and `dump()` methods in most of the framework’s classes. Users and package authors can include this trait for easier code debugging. `
use Illuminate\Support\Traits\Conditionable;use Illuminate\Support\Traits\Dumpable; class Address{    use Conditionable, Dumpable;     // ...}
``
$address = new Address; $address->setThis()->setThat(); $address->setThis()->dd()->setThat(); 
` ### 8. Limit Eager Load Laravel 11 will allow limiting eagerly loaded records natively, without external packages. `
class User extends Model{    public function posts()    {        return $this->hasMany(Post::class);    }}
``
class Post extends Model{    // ...}
``
$users = User::with(['posts' => function ($query) {    $query->latest()->limit(10); }])->get();
`Before Laravel 11, you were using a separate package [Eloquent Eager Limit](https://github.com/staudenmeir/eloquent-eager-limit) by [Jonas Staudenmeir](https://github.com/staudenmeir). ### 9. Casts Method From Laravel 11, the casts will be provided in the protected method `casts()` instead of the protected property `$casts`. `
class User extends Authenticatable{    // ...     protected function casts(): array    {        return [            'email_verified_at' => 'datetime',            'password' => 'hashed',        ];    }}
`Also, now it is possible to provide an array. `
protected function casts(): array{    return [        'bookOptions' => [AsCollection::class, OptionCollection::class],    ];}
`This is a non-breaking change. You only need to know that the `casts()` method is prioritized over the `$casts` property. ### 10. once() Method There’s a new memoization function called `once()`. This function ensures that a callable is called only once, returning the same result on subsequent calls. `
class User extends Model{    public function stats(): array    {        return once(function () {            // Expensive operations to generate user stats, multiple db queries, etc...             return $stats;        });    }}
``
 $userA->stats();$userA->stats();  $userB->stats(); $userB->stats(); 
` ### 11. Last But Not the Least!: PHP v8.2 is the Minimum Required Version of PHP Finally, Laravel 11 has dropped support for PHP 8.1. Now, PHP 8.2 is the minimum requirement. ### 12. Laravel Reverb Laravel Reverb brings blazing-fast and scalable real-time WebSocket communication directly to your Laravel application and provides seamless integration with Laravel’s existing suite of event broadcasting tools, such as [Laravel Echo](https://laravel.com/docs/11.x/broadcasting). Futhermore, Reverb supports horizontal scaling via Redis’s publish / subscribe capabilities, allowing you to distribute your WebSocket traffic across multiple backend Reverb servers all supporting a single, high-demand application. Here is an example of a stress test with ~30,000 clients maintaining open connections to Reverb, where each connection is subscribed to 10 different channels, and more than 6,000 messages are being exchanged per second: ![](https://d1hdtc0tbqeghx.cloudfront.net/wp-content/uploads/2024/03/14140023/image-1024x710.png)Source: [Laravel Blog](https://blog.laravel.com/) Additionally, you may monitor the performance of your Reverb servers in Laravel Pulse to get a better understanding of the number of connections and messages being handled. We encourage you to check out the [release notes](https://laravel.com/docs/11.x/releases) and [upgrade guide](https://laravel.com/docs/11.x/upgrade) for more information on the new features and improvements in Laravel 11. ![author](https://d1hdtc0tbqeghx.cloudfront.net/wp-content/uploads/2023/06/22062906/NIRAV-1.png) ###### Nirav Panchal Lead – Custom DevelopmentLead of the Custom Development team at KrishaWeb, holds AWS certification and excels as a Team Leader. Renowned for his expertise in Laravel and React development. With expertise in cloud solutions, he leads with innovation and technical excellence. ![author](https://d1hdtc0tbqeghx.cloudfront.net/wp-content/uploads/2023/06/22062906/NIRAV-1.png) Interact With Me- - - [ ](mailto:) --- _View the original post at: [https://www.krishaweb.com/blog/laravel-11-released/](https://www.krishaweb.com/blog/laravel-11-released/)_ _Served as markdown by [Third Audience](https://github.com/third-audience) v3.6.1_ _Generated: 2026-07-17 06:48:57 UTC_