updateOrCreate(['key' => $key], ['value' => $value ?? '']); } /** * Retrieve a persistent setting, or null when nothing is stored for the key. */ public static function fetch(string $key): ?string { return static::query()->where('key', $key)->first()?->value; } }