Skip to content

Commit

Permalink
When saving the fields groups to db, the value should not be encoded …
Browse files Browse the repository at this point in the history
…to json string (#501)
  • Loading branch information
Yanhao LI authored and ifox committed Jan 28, 2020
1 parent 076ed17 commit b48793a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repositories/Behaviors/HandleFieldsGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public function getFormFieldsHandleFieldsGroups($object, $fields)

protected function handleFieldsGroups($fields) {
foreach ($this->fieldsGroups as $group => $groupFields) {
$fields[$group] = json_encode(Arr::where(Arr::only($fields, $groupFields), function ($value, $key) {
$fields[$group] = Arr::where(Arr::only($fields, $groupFields), function ($value, $key) {
return !empty($value);
}));
});
Arr::forget($fields, $groupFields);
}

Expand Down

0 comments on commit b48793a

Please sign in to comment.