Laravel 9.43 released: What’s New This Time?

Laravel 9.43 released: What’s New This Time?

Introduction

Laravel is an open-source PHP web framework written in PHP. It was created by Taylor Otwell that follows model-view-controller architecture based on Symphony. The framework was first released in 2011, and currently, it is licensed under MIT license.

On December 7, 2022, Laravel’s 9.43 version was released. Today, we will be talking about what’s been added to the frameworks, and the fixes that have been made. But before we jump right to version 9.43, we first need to understand where it all started.

Laravel’s Journey Through The Years

2011: As mentioned, Laravel 1 was released in June 2011. It had built-in support for models, views, authentication, sessions, and routing. In the same year, September saw the release of the second version, which introduced a blade templating system and controllers.

2012: In February 2012, Laravel 3 was released with database management support, Bundles packaging system, and Artisan.

2013: Laravel 4 was released in May 2013 with database seeding, soft database deletion support, and message queues support.

2015: Laravel 5 came with Elixir for package handling, Socialite for simplifying authentication, and Scheduler in February 2015. In the same year in June, Laravel 5.1 introduced a new directory structure, route caching, and simplified method injection. December 2015 brought to version 5.2, which had array validation, Laravel cashier, Server monitoring, and authentication scaffolding.

2016: The first and only release of 2016 was Laravel 5.3, which had an echo, a new notification system, Laravel Scout, and Passport.

2017: Laravel 5.4 was released in January 2017 with Laravel Dusk and Mix, Automatic Facades, and Routing improvements. In August 2017, Laravel 5.5 introduced PHP 7+, automatic package discovery, and new route methods.

2018: In February 2018, Laravel 5.6 was released with Argon Password Hashing Support, API controller generation, new blade directives, and Bootstrap 4. September 2018 came with Laravel 5.7, which supported Laravel Dump Server, URL Generator, Callable Syntax, Error message improvements, and Laravel Nova.

2019: In September 2019, Laravel 6 was released. It had semantic versioning and compatibility with Vapor improved authorization response; and sub-query improvements.

2020: Laravel 7 was released in March 2020 with blade component tags, Sanctum, fluent string operations, and custom eloquent casts. In September 2020, Laravel 8 came with migration squashing, model factory classes, and Laravel Jetstream.

2022: Laravel 9 was released It requires PHPUnit 9 for the installation and depends upon Symphony 9 libraries. In Laravel 9, anonymous stub migration was added which solves the problem of the migration class name collisions.

The string functions like str_contains(), str_starts_with(), and str_ends_with() also brought many fixes and features with it, along with the new query builder interface with type hinting, refactoring, and static analysis.

What’s New in Laravel 9.43?

Eager-Loading Specific Columns with ‘withWhereHas’

Working the same as the ‘Model::with()’ method, ‘withWhereHas()’, which supports eager-loading specific columns when used.

model:show with the model listing

If the developer wants to see which policies are attached to a particular model, the output of the models will now have the model policies in the ‘model:show’ command.

‘whenIsUlid’ Stringable Method

If a ‘Stringable’ instance is a ULID (Universally Unique Lexicographically Sortable Identifier), the ‘whenIsUlid’ method will run given a callback.

str(’01GJSNW9MAF792C0XYY8RX6QFT’)->whenIsUlid(function () {

    // Your code

});

Laravel 9.43.0 Summary

Additions

Here are the three additions that came with Laravel 9.43

  • Support for eager loading specific columns with ‘withWhereHas’
  • Model policies can be listed in the model show command
  • New Stringable command with ‘Illuminate/Support/Stringable::whenIsUlid()’

Fixes

With Laravel 9.43, the missing reserved names in GeneratorCommand have now been added.

Changes

There are two changes in Laravel 9.43 that are noteworthy:

  • To env:encrypt command, the base64 key can now be passed.
  • With correct FQCN, model:show searched values can be replaced.

Conclusion

Laravel is an open-source backend framework based on PHP which comes with functions like authentication, routing, sessions, and caching. It was first released in 2011, and recently, version 9.43 was released.

Version 9.43 adds features like support for eager-loading specific columns with ‘withWhereHas’, listing model policies in the model:show output, and a new Stingable method with ‘whenIsUlid’.


  • Category: Uncategorized 
  • Written by: Meet Rathod
  • Date: January 17, 2023
Share:
LET'S WORK TOGETHER

We Love to Listen to Your Requirements

You can expect:

    Let's Talk About Project