Problem description
I’m using the PrettyJsonField to display a column that is cast as an array.
However, I get the following error:
Novadaemon\FilamentPrettyJson\Form\PrettyJsonField::getCopyableState(): Return value must be of type ?string, array returned
According to the documentation, using an array cast should not be a problem, but in my case, it triggers this error.
My code
Model:
protected function casts(): array
{
return [
'serp' => 'array',
];
}
Filament Form:
PrettyJsonField::make('serp')
->label('SERP')
->columnSpanFull()