Давайте начнем быстро Я нашел новые вещи в Laravel 9.21 Released, которыми хочу поделиться с вами.
- Добавить whenCounted в JsonResourchttps://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'),
];
}
}
- Добавляет приведение перечислений к Requesthttps://github.com/laravel/framework/pull/43239
$request->enum('status', StatusEnum::class);
-
Представляем новый свежий вид для Artisan
https://github.com/laravel/framework/pull/43065
https://github.com/nunomaduro/termwind -
Модель Artisan:команда show
https://github.com/laravel/framework/pull/43156
https://github.com/doctrine/dbal
php artisan model:show User
- Artisan about Commandhttps://github.com/laravel/framework/pull/43147
php artisan about
https://laravel-news.com/customize-laravel-about-command
Надеюсь, вам понравилось вместе со мной, а чтобы узнать больше об этом выпуске, посетите источники и поищите еще. Я обожаю вас, которые ищут все новое.
Источник :- https://www.youtube.com/watch?v=Ilv7jYj2_GU
Источник :- https://www.youtube.com/watch?v=JR42YZ9ZbNQ
Источник :- https://www.youtube.com/watch?v=25Zg5MvXFUo
Источник :- https://www.youtube.com/watch?v=PBBTgJwMUsk
Источник :- https://laravel-news.com/laravel-9-21-0