'Enable YouTube video/audio downloading (requires yt-dlp binary + legal review)', 'ads_enabled' => 'Display advertising slots', 'maintenance' => 'Maintenance mode notice on tool pages', ]; public function index(): string { return $this->render('settings_index', [ 'flags' => self::FLAGS, 'values' => model(SettingModel::class)->all(), ]); } public function save(): ResponseInterface { $model = model(SettingModel::class); $posted = (array) $this->request->getPost(); foreach (array_keys(self::FLAGS) as $key) { $model->put($key, isset($posted[$key]) ? '1' : '0'); } if (! empty($posted['retention_hours'])) { $hours = max(1, min(72, (int) $posted['retention_hours'])); $model->put('retention_hours', (string) $hours); } service('cache')->clear(); return redirect()->to('/admin/settings'); } }