Force default to the value when syncing settings

This commit is contained in:
Nabeel Shahzad
2021-02-23 11:23:40 -05:00
parent baf63361a0
commit a52e0410a7

View File

@@ -161,6 +161,7 @@ class SeederService extends Service
$count = DB::table('settings')->where('id', $id)->count('id');
if ($count === 0) {
$attrs['value'] = $attrs['default'];
DB::table('settings')->insert($attrs);
} else {
unset($attrs['value']); // Don't overwrite this