Fix SettingsController saving boolean value as 'on'

This commit is contained in:
Kevin Susanto
2018-09-04 16:11:51 +08:00
parent c95fe3c971
commit f46e5090ae
3 changed files with 6 additions and 2 deletions

View File

@@ -40,6 +40,10 @@ class SettingsController extends Controller
continue;
}
if ($setting->type == 'bool' || $setting->type == 'boolean') {
$value = get_truth_state($value);
}
Log::info('Updating "'.$setting->id.'" from "'.$setting->value.'" to "'.$value.'"');
$setting->value = $value;
$setting->save();