Open graphem opened 9 months ago
Hi, @graphem Pls send me code example
If you have your model that inherits from \Stepanenko3\NovaSettings\Models\Settings
then you have to add array
casting to a model that you use as a resource in NOVA:
protected $casts = [
'fields' => 'array',
'settings' => 'array',
];
so you will get
class Settings extends \Stepanenko3\NovaSettings\Models\Settings
{
use HasFactory;
use LogsActivity;
protected $casts = [
'fields' => 'array',
'settings' => 'array',
];
}
Hi! Great package, love it so far.
I am trying to make the Nova repeater field work, it seems to work at first and the data is saved, however, it is not parse back right when trying to edit, so it shows up as empty in the nova UI, but still in the DB.
Could be an issue with preparing the data back since it is a json field inside the json field.
Also I have a similar issue with the multiselect, the value are not preserved when editing back.
Thanks a lot!