diff --git a/app/Services/OptionRepository.php b/app/Services/OptionRepository.php index 2a48a339..86b5e27b 100644 --- a/app/Services/OptionRepository.php +++ b/app/Services/OptionRepository.php @@ -57,7 +57,21 @@ class OptionRepository implements ArrayAccess, ConfigContract $this->set($key, config("options.$key")); } - return Arr::get($this->items, $key, $default); + $value = Arr::get($this->items, $key, $default); + + switch (strtolower($value)) { + case 'true': + case '1': + return true; + case 'false': + case '0': + return false; + case 'null': + case '(null)': + return; + } + + return $value; } /** diff --git a/resources/views/admin/options.tpl b/resources/views/admin/options.tpl index d52d64bc..1607848c 100644 --- a/resources/views/admin/options.tpl +++ b/resources/views/admin/options.tpl @@ -83,7 +83,7 @@