Laravel 9 feature and Package
- 24-Feb-2022 04:49AM
- Zahidul Islam
- 1298
Laravel v9 was released February 8th, 2022. Thare was all the new features and changes in this version.
Every Artisan lover wati for every laravel upgrade version. Every version chnage menas some package update bug fixing and extra fieature adding or updateing we know.
But laravel 9 was most update php version , laravel 8 support php minimum 7.4 . PHP 8 more update and latest version. So Laravel 9 and PHP 8 make a hot combilnstion for every developer.
New Design for routes:list
The routes:list
command has been included in Laravel for a long time now, and one issue that some times arise is if you have a huge and complex routes defined it can get messy trying to view them in the console. Thanks to a pull request from Nuno Maduro this is getting a makeover,
New Query Builder Interface
Thanks to Chris Morrell, Laravel 9 will feature a new Query Builder Interface, and you can see this merged PR for all the details.
For developers who rely on type hints for static analysis, refactoring, or code completion in their IDE, the lack of a shared interface or inheritance between
Query\Builder
,
1use App\Http\Controllers\OrderController;
2
3Route::controller(OrderController::class)->group(function () {
4 Route::get('/orders/{id}', 'show');
5 Route::post('/orders', 'store');
6});
Controller Route Groups
Route group improvements were contributed by Luke Downing.
You may now use the controller
method to define the common controller for all of the routes within the group. Then, when defining the routes, you only need to provide the controller method that they invoke:
1use App\Http\Controllers\OrderController;
2
3Route::controller(OrderController::class)->group(function () {
4 Route::get('/orders/{id}', 'show');
5 Route::post('/orders', 'store');
6});
continue.....