优化setting 保存json

This commit is contained in:
Edward Yang 2023-02-21 10:26:37 +08:00
parent 59bcdb0fda
commit 3ff13b3c70
1 changed files with 2 additions and 2 deletions

View File

@ -110,8 +110,8 @@ class SettingRepo
'type' => $type,
'space' => $code,
'name' => $name,
'value' => (string) $value,
'json' => 0,
'value' => is_array($value) ? json_encode($value) : (string)$value,
'json' => is_array($value),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
];