Laravel 11でModel Castsの変更点を見てみる
Laravel 11で変更された点がもう1つあります。 Castが関数のように変更されたということです。 https://laravel.com/docs/11.x/releases#model-cast-improvements このようにすればよいです。Collectionや配列などで、EnumやCollectio
GGAMI
Laravel 11で変更された点がもう1つあります。
Castが関数のように変更されたということです。
Model Casts Improvements
Model casts improvements were contributed by Nuno Maduro.
Laravel 11 supports defining your model's casts using a method instead of a property. This allows for streamlined, fluent cast definitions, especially when using casts with arguments:https://laravel.com/docs/11.x/releases#model-cast-improvements