fixed edit
This commit is contained in:
parent
2556a2227f
commit
da9a007bac
|
|
@ -53,7 +53,13 @@ class SettingRepo
|
|||
|
||||
public static function update($type, $code, $fields)
|
||||
{
|
||||
Setting::query()->where('type', $type)->where('space', $code)->delete();
|
||||
$columns = array_keys($fields);
|
||||
Setting::query()
|
||||
->where('type', $type)
|
||||
->where('space', $code)
|
||||
->whereIn('name', $columns)
|
||||
->delete();
|
||||
|
||||
$rows = [];
|
||||
foreach ($fields as $name => $value) {
|
||||
$rows[] = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue