Learn About the Changes to Model Casts in Laravel 11
There is one more change in Laravel 11: Casts have been changed to work like functions. https://laravel.com/docs/11.x/releases#model-cast-improvements So you ca
GGAMI
There is one more change in Laravel 11:
Casts have been changed to work like functions.
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: