Laravel 9 Release

Laravel 9 Release

Laravel 9 Release

Today Laravel 9 was released. Here are the list of change at a glance.

    1. PHP 8.0: Laravel 9 requires at least PHP 8.0
    2. Symphony Mailer: Instead of Swift Mailer (no longer maintained), Symphony Mailer will be used.
    3. Flysystem 3.x: Flysystem 3.x support is added.
    4. Improved Eloquent Accessors / Mutators: Laravel 9.x offers a new way to define Eloquent accessors and mutators.
    5. Enum Eloquent Attribute Casting: Eloquent can now allows to cast attribute values to PHP enums. But this is only available for PHP 8.1+
    6. Implicit Route Bindings With Enums: This feature is added by Nuno Maduro. This feature will allowtypehint an Enum in route definition.
    7. Forced Scoping Of Route Bindings: This feature will allow user to add second model in  Route bindings such that it must be a child model of pervious model.
    8. Route Group for Controllers: Another amazing feature which will allow user to define a common  controller. Such as:
      use App\Http\Controllers\OrderController;
      
      Route::controller(OrderController::class)->group(function () {
          Route::get('/orders/{id}', 'show');
          Route::post('/orders', 'store');
      }); 
    9. Full Text Indexes / Where Clauses:  This feature will allow user to use fulltext with “where” clause. eg. ->whereFullText(‘something’, ‘another thing’).
    10. Laravel Scout Database Engine: User can now use Scout Search service in small to medium Database.
    11. Rendering inline blade templates: This will allow user to transform raw Blade template to valid HTML. eg.
      use Illuminate\Support\Facades\Blade;
      
      return Blade::render('Hello, {{ $name }}', ['name' => 'Julian Bashir']);
    12. Slot Name Shortcut:  User now specify slot’s name using a convenient with shorter syntax.
    13. .Checked / Selected Blade Directives: You can now use “@checked” directive to indicate given HTML checkbox is “checked”.
      <input type="checkbox"
              name="active"
              value="active"
              @checked(old('active', $user->active)) />
    14. Bootstratp 5 pagination views added: You can use both Tailwind or Bootstrap 5 pagination views. You just have to call “use BootstrapFive in boo methof of App\Providers\AppServiceProvider class.
    15. Improved Validation Of Nested Array Data: Improved Validation Of Nested Array Data.
    16. Laravel Breeze API & Next.js: Laravel Breeze API scaffolding and Next.js starter kit is added.
    17. Improved Ignition Exception Page: New version added with dark mode, open in editor and many more.
    18. Improved route:list CLI Output: This will now provide more data.
    19. Test Coverage Using Artisan test Command: User can explore the coverage area of text by add -coverage flag in artisan command.
    20. Soketi Echo Server: Soketi Echo Server support added.
    21. Improved Collections IDE Support: Added support for Laravel Collections IDE Support.
    22. Helpers: Some new helpers added.

Editorial Staff

A Learner and trying to share what I learned!