Let's get started quickly I found new things in Laravel 9.21 Released I wanted to share with you.
- Add whenCounted to JsonResourc https://github.com/laravel/framework/pull/43101
loadCount() - whenCounted()
class PostController
{
public function show(Post $post)
{
return new PostResource($post->loadCount('comments'));
}
}
class PostResource extends PostResource
{
public function toArray($request)
{
return [
'id' => $this->id,
'comments_count' => $this->whenCounted('comments'),
];
}
}
- Adds enum casting to Request https://github.com/laravel/framework/pull/43239
$request->enum('status', StatusEnum::class);
Introducing a fresh new look for Artisan
https://github.com/laravel/framework/pull/43065
https://github.com/nunomaduro/termwindArtisan model:show command
https://github.com/laravel/framework/pull/43156
https://github.com/doctrine/dbal
php artisan model:show User
- Artisan about Command https://github.com/laravel/framework/pull/43147
php artisan about
https://laravel-news.com/customize-laravel-about-command
I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Source :- https://www.youtube.com/watch?v=Ilv7jYj2_GU
Source :- https://www.youtube.com/watch?v=JR42YZ9ZbNQ
Source :- https://www.youtube.com/watch?v=25Zg5MvXFUo
Source :- https://www.youtube.com/watch?v=PBBTgJwMUsk
Source :- https://laravel-news.com/laravel-9-21-0
Top comments (0)