Do you want to know when Laravel 11 will be released and what new major updates or changes it will bring with new features? So in this guide, you will know in detail when Laravel 11 will be released and what new features are introduced in it.
This time the version Laravel 11 is coming on March 12th, 2024, and many big changes have been made in it such as PHP 8.1 version being removed, the structure of the application being made more minimalistic skeleton, and new features being added to it such as New Dumpable Trait, Model::casts() method live, etc.
To get your dream job as a php Laravel developer, it is also important that you know about the new version of Laravel 11 and what new changes it has brought, and what features have been added. These Laravel interview questions are asked so often, such as the first question is What is the latest version of Laravel, and what new features and updates it?
Release Date of Laravel 11
According to the official community of Laravel, its release will be in Q1 2024, which means Laravel 11 will be released on March 12th, 2024.
The Laravel community releases a new version every year, and it adds some new features and changes in it every version, you can check when Laravel has been released which version, here:
Version | PHP (*) | Release | Bug Fixes Until | Security Fixes Until |
---|---|---|---|---|
6 (LTS) | 7.2 – 8.0 | September 3rd, 2019 | January 25th, 2022 | September 6th, 2022 |
7 | 7.2 – 8.0 | March 3rd, 2020 | October 6th, 2020 | March 3rd, 2021 |
8 | 7.3 – 8.1 | September 8th, 2020 | July 26th, 2022 | January 24th, 2023 |
9 (LTS) | 8.0 – 8.1 | February 8th, 2022 | February 8th, 2024 | February 8th, 2025 |
10 | 8.0 – 8.1 | January 24th, 2023 | July 30th, 2024 | January 28th, 2025 |
11 | 8.2 | March 12th, 2024 | August 5th, 2025 | February 3th, 2026 |
Upcoming New Features and Updates with Laravel 11
Here are some big changes and new features introduced by laravel 11 version:
Laravel 11 will not support php 8.1 version
This is a very big change in Laravel 11 version, it will support php 8.2 or 8.3 stable version. And it will not support PHP version 8.1.
A more minimal application skeleton
Skeleton application has been introduced in Laravel 11 version, which means that now it is done in less code and less directory structure, which will make programming easier for developers or coders.
To install Laravel version 11, you will see a more minimalistic application skeleton; As shown below:
app
├── Http
│ └── Controllers
│ └── Controller.php
├── Models
│ └── User.php
└── Providers
└── AppServiceProvider.php
bootstrap
├── app.php
├── cache
│ ├── packages.php
│ └── services.php
└── providers.php
Laravel 11 Added New Dumpable Trait Feature
Laravel 11 adds a new dumpable feature that will allow you to easily dump the contents of an object to the console and replace the existing dd and dump methods.
Here is a code example of how to use New Dumpable Trait:
<?php
namespace App\ValueObjects;
use Illuminate\Support\Traits\Dumpable;
use Illuminate\Support\Traits\Conditionable;
class Post
{
use Conditionable, Dumpable;
// ...
}
$post = new Post;
// Before:
$post->foo()->bar();
// After:
$post->foo()->dd()->bar();
New features of Laravel: Model::casts() method live
The new Model::casts() method feature has been added to Laravel models, it will help in performing different types of operations with the models.
Here’s a code example of how to use add cast attributes to different data types on models with the help of model:casts():
class User extends Model
{
protected $casts = [
'email_verified_at' => 'datetime',
];
}
Remove Timestamp from Migration File Name
The date time stamp has also been removed from the Laravel migration file name,
Migration file name in older versions of Laravel:
2024_01_00_191747_create_units_table.php
In Laravel 11 version migration file name:
create_units_table.php
How to Install Laravel 11?
To install the master branch from the laravel/laravel repository, just simply type laravel new hello-world --dev
command on cmd or terminal window and press enter:
laravel new hello-world --dev
If you have installed composer in your system, you can type composer create-project --prefer-dist laravel/laravel hello-world dev-master
command on cmd or terminal window to install laravel 11 in your system:
composer create-project --prefer-dist laravel/laravel hello-world dev-master
Conclusion
It is very important for a Laravel developer to keep track of the new features and major changes coming in Laravel 11, this keeps your skills updated and you do not face any problem in working in the laravel framework.