Loading image

Blogs / Programming

Laravel 11.24 Released: New Features Unveiled

Laravel 11.24 Released: New Features Unveiled

  • showkat ali
  • 1 Comments
  • 986 View

Laravel 11.24 has been released, bringing with it several exciting new features and updates. One of the notable additions is the introduction of shorthands for Process fakes, making it easier to work with process fakes in your application. [2]

New Features and Updates

 

  • Process Fakes Shorthands

    : Laravel 11.24 introduces shorthands for Process fakes, allowing you to set the exit code and throw exceptions more easily. For example:
Process::fake([
    'php -l script.php' => 255,
    'cat README.txt' => new \RuntimeException('fake exception message'),
]);
  • nullOnUpdate() Method

    : A new nullOnUpdate() method has been added to the ForeignKeyDefinition schema class, allowing you to set the foreign key value to null when the referenced model is updated. [2].
$table->foreign('user_id')
      ->references('id')
      ->on('users')
      ->nullOnUpdate();
  • Backed Enum Support

    : Laravel 11.24 now supports backed enums in the Route::can() method. [2]
Route::post('/request', function () {...})->can(Permissions::CAN_REQUEST);
  • prependLocation() Method

    : The prependLocation() method has been added to the View factory, allowing you to use the method with the View facade.
// Before
View::getFinder()->addLocation($path);     // ✅
View::getFinder()->prependLocation($path); // ✅
View::addLocation($path);                  // ✅
View::prependLocation($path);              // ❌
 
// After
View::prependLocation($path);              // ✅
  • Auto-Discovery of Console Commands

    : Laravel 11.24 introduces auto-discovery of console commands in the app/Console/Commands path. However, this feature was broken in v11.24.0 and was quickly patched in v11.24.1. [2]

Other Updates and Fixes

Laravel 11 Release Notes

Laravel 11 continues the improvements made in Laravel 10.x by introducing a streamlined application structure, per-second rate limiting, health routing, graceful encryption key rotation, queue testing improvements, Resend mail transport, Prompt validator integration, new Artisan commands, and more. In addition, Laravel Reverb, a first-party, scalable WebSocket server has been introduced to provide robust real-time capabilities to your applications. [2]

Support Policy

For all Laravel releases, bug fixes are provided for 18 months and security fixes are provided for 2 years. For all additional libraries, including Lumen, only the latest major release receives bug fixes. In addition, please review the database versions supported by Laravel. [2]

PHP Version

Laravel 11.x requires a minimum PHP version of 8.2. [2]

 

 

 

  • Programming
showkat ali Author

showkat ali

Greetings, I'm a passionate full-stack developer and entrepreneur based in Pakistan. I specialize in PHP, Laravel, React.js, Node.js, JavaScript, and Python. I own interviewsolutionshub.com, where I share tech tutorials, tips, and interview questions. I'm a firm believer in hard work and consistency. Welcome to interviewsolutionshub.com, your source for tech insights and career guidance

1 Comments

Anonymous User
Ali hasnain

good to hear about Auto-Discovery of Console Commands.

Post Comment

Recent Blogs

Recent posts form our Blog

Dynamic Drag  and Drop Form Builder with React: A Step-by-Step Guide

Dynamic Drag and Drop Form Builder with React: A Step-by-Step Guide

showkat ali
/
Programming

Read More
An Innovative Method to Building Online Urdu Corpus (اردو کارپس)

An Innovative Method to Building Online Urdu Corpus (اردو کارپس)

Nasir Hussain
/
English

Read More
Simulating the Iron Dome Defense System with Python: A Complete Guide

Simulating the Iron Dome Defense System with Python: A Complete Guide

showkat ali
/
Programming

Read More
[FIXED]  target class [role] does not exist in  laravel 11

[FIXED] target class [role] does not exist in laravel 11

showkat ali
/
Programming

Read More
Understanding Recursive Functions in Python: A Deep Dive

Understanding Recursive Functions in Python: A Deep Dive

showkat ali
/
Programming

Read More
Using Multiple Select as Count in the Select2 Search Box

Using Multiple Select as Count in the Select2 Search Box

showkat ali
/
Programming

Read More