foreach() argument must be of type array|object, string given {"userId":1,"exception":"[object] (ErrorException(code: 0): foreach() argument must be of type array|object, string given at /var/www/html/vendor/filament/forms/src/Components/Repeater.php:783)
Below is how I try to
->beforeFormFilled(function (EditAction $action, Order $record) {
// Runs before the form fields are populated from the database.
// dd(gettype(json_decode($record['items'],true)));
$record['items'] = json_decode($record['items'], true);
})
dd(gettype(json_decode($record['items'])));
$record['items'] = json_decode($record['items'], true);
foreach() argument must be of type array|object, string given {"userId":1,"exception":"[object] (ErrorException(code: 0): foreach() argument must be of type array|object, string given at /var/www/html/vendor/filament/forms/src/Components/Repeater.php:783)
Below is how I try to
->beforeFormFilled(function (EditAction $action, Order $record) {
// Runs before the form fields are populated from the database.
// dd(gettype(json_decode($record['items'],true)));
$record['items'] = json_decode($record['items'], true);
})
dd(gettype(json_decode($record['items'])));
$record['items'] = json_decode($record['items'], true);