Set missing value from default
This commit is contained in:
parent
a52e0410a7
commit
a4c431d39f
@ -150,7 +150,7 @@ class SeederService extends Service
|
|||||||
'order' => $order,
|
'order' => $order,
|
||||||
'name' => '',
|
'name' => '',
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'value' => '',
|
'value' => $attrs['value'],
|
||||||
'default' => $attrs['value'],
|
'default' => $attrs['value'],
|
||||||
'options' => '',
|
'options' => '',
|
||||||
'type' => 'hidden',
|
'type' => 'hidden',
|
||||||
@ -161,7 +161,6 @@ class SeederService extends Service
|
|||||||
|
|
||||||
$count = DB::table('settings')->where('id', $id)->count('id');
|
$count = DB::table('settings')->where('id', $id)->count('id');
|
||||||
if ($count === 0) {
|
if ($count === 0) {
|
||||||
$attrs['value'] = $attrs['default'];
|
|
||||||
DB::table('settings')->insert($attrs);
|
DB::table('settings')->insert($attrs);
|
||||||
} else {
|
} else {
|
||||||
unset($attrs['value']); // Don't overwrite this
|
unset($attrs['value']); // Don't overwrite this
|
||||||
|
Loading…
Reference in New Issue
Block a user