优化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, 'type' => $type,
'space' => $code, 'space' => $code,
'name' => $name, 'name' => $name,
'value' => (string) $value, 'value' => is_array($value) ? json_encode($value) : (string)$value,
'json' => 0, 'json' => is_array($value),
'created_at' => Carbon::now(), 'created_at' => Carbon::now(),
'updated_at' => Carbon::now(), 'updated_at' => Carbon::now(),
]; ];