How to add custom cast type in Laravel?
What is casting in Laravel? With casting we can transform Eloquent attribute values when retrieving or set them on model instances. Casting does not require to define any additional methods on model. The $casts property is an array. The key of the array is the name of the attribute being cast and the value of … Read more