Closed khanakia closed 11 months ago
I got it fixed by using isJson() by using it like below
\InvadersXX\FilamentJsoneditor\Forms\JSONEditor::make('functions_stack')->isJson()
In version JSONEditor 3.1 there is a problem with saving the field. (Mysql json)
After making changes:
Code fix it:
->dehydrateStateUsing(function ($state) {
if(is_string($state)){
return json_decode($state, true);
}
return $state;
})
In version JSONEditor 3.1 there is a problem with saving the field. (Mysql json)
After making changes:
Code fix it:
->dehydrateStateUsing(function ($state) { if(is_string($state)){ return json_decode($state, true); } return $state; })
I have the same issue. filament: v3.0.102 jsoneditor: v3.1
I had the same problem and solved it with https://github.com/invaders-xx/filament-jsoneditor/issues/27#issuecomment-1827958924
I have a JSON columns which has a JSON cast.
I have a Mysql json type field
$table->json('functions_stack');
When i use the
$casts
it shows empty but when i remove the $casts it works finesWhen $casts removed it works