value('value'); return $value !== null ? $value : $default; } public function ConfigBool(string $name, bool $default = false): bool { $value = $this->Config($name, null); if ($value === null) { return $default; } return in_array(strtolower(trim((string) $value)), ['1', 'true', 'yes', 'on'], true); } public function UpdateConfig($name, $value) { return Setting::updateOrCreate( ['key' => $name], ['value' => $value] ); } }