Laravel 9 Release
Today Laravel 9 was released. Here are the list of change at a glance.
- PHP 8.0: Laravel 9 requires at least PHP 8.0
- Symphony Mailer: Instead of Swift Mailer (no longer maintained), Symphony Mailer will be used.
- Flysystem 3.x: Flysystem 3.x support is added.
- Improved Eloquent Accessors / Mutators: Laravel 9.x offers a new way to define Eloquent accessors and mutators.
- Enum Eloquent Attribute Casting: Eloquent can now allows to cast attribute values to PHP enums. But this is only available for PHP 8.1+
- Implicit Route Bindings With Enums: This feature is added by Nuno Maduro. This feature will allowtypehint an Enum in route definition.
- 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.
- 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'); });
- Full Text Indexes / Where Clauses: This feature will allow user to use fulltext with “where” clause. eg. ->whereFullText(‘something’, ‘another thing’).
- Laravel Scout Database Engine: User can now use Scout Search service in small to medium Database.
- 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']);
- Slot Name Shortcut: User now specify slot’s name using a convenient with shorter syntax.
- .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)) />
- 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. - Improved Validation Of Nested Array Data: Improved Validation Of Nested Array Data.
- Laravel Breeze API & Next.js: Laravel Breeze API scaffolding and Next.js starter kit is added.
- Improved Ignition Exception Page: New version added with dark mode, open in editor and many more.
- Improved route:list CLI Output: This will now provide more data.
- Test Coverage Using Artisan test Command: User can explore the coverage area of text by add -coverage flag in artisan command.
- Soketi Echo Server: Soketi Echo Server support added.
- Improved Collections IDE Support: Added support for Laravel Collections IDE Support.
- Helpers: Some new helpers added.