diff --git a/src/Repositories/Behaviors/HandleFieldsGroups.php b/src/Repositories/Behaviors/HandleFieldsGroups.php index 8baffde35..9a9288b51 100644 --- a/src/Repositories/Behaviors/HandleFieldsGroups.php +++ b/src/Repositories/Behaviors/HandleFieldsGroups.php @@ -53,6 +53,11 @@ protected function handleFieldsGroups($fields) { $fields[$group] = Arr::where(Arr::only($fields, $groupFields), function ($value, $key) { return !empty($value); }); + + if (empty($fields[$group])) { + $fields[$group] = null; + } + Arr::forget($fields, $groupFields); }