You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been discussed before in different issues raised laravel/framework.
I think it would be rather handy if Eloquent's typecasting was extendable, so that as well as being able to automatically cast to the existing: integer, real, float, double, string, boolean, object, array, collection, date and datetime
That we could also cast to custom cast types.
For instance when using value objects this would allow the automatic casting of a dec to a Money type object.
This has been discussed before in different issues raised laravel/framework.
I think it would be rather handy if Eloquent's typecasting was extendable, so that as well as being able to automatically cast to the existing:
integer,real,float,double,string,boolean,object,array,collection,dateanddatetimeThat we could also cast to custom cast types.
For instance when using value objects this would allow the automatic casting of a dec to a Money type object.
Thoughts?