Form: Nested JSON values are stored as string instead of integers
I have a form like:
And my model even casts the json values:
But if I save my form the model is created in the databse with string values in the JSON column (see the
file_expire_days
):
{"base_path": "test", "file_expire_days": "15", "auto_delete_files": true, "project_expire_days": 30, "notify_project_expire_days": [14, "7", "1"]}
If I leave the default value it is saved correctly as an integer. How can I tell filament that the values should be stored according to the model cast?2 Replies
?
Thanks @Leandro Ferreira this works. Is it possible to build something like this directly into Filament? Ideally by respecting the model
$casts
-property?