diff --git a/config/settings.php b/config/settings.php index bba1499..8afff84 100644 --- a/config/settings.php +++ b/config/settings.php @@ -16,4 +16,18 @@ 'encrypt' => [], + /* + |-------------------------------------------------------------------------- + | Force save settings + |-------------------------------------------------------------------------- + | + | This option controls whether settings are forced to be saved. If set to + | true, this will save any settings without regard to security (i.e. + | whether the setting has been previously set). + | + */ + + 'force' => false, + + ]; \ No newline at end of file diff --git a/src/Settings.php b/src/Settings.php index 5fa44b5..381a4ff 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -69,7 +69,7 @@ public function set($changes, bool $force = false) } // ARE WE FORCING? OR SHOULD WE BE SECURE? - if ($force) { + if (config('settings.force') || $force) { foreach ($changes as $key => $value) {