update setting

This commit is contained in:
2026-08-26 12:56:57 +03:30
parent c635ab5f5f
commit ad78545ebd
7 changed files with 202 additions and 66 deletions
@@ -146,14 +146,14 @@ class DeploySettingsConstCommand extends Command
$sync = app(SettingsRuntimeCanEditSync::class);
$sync->useDatabase($database);
$updated = $sync->sync();
$this->line(" runtime can_edit sync: {$updated} row(s) updated");
$this->line(" can_edit sync: {$updated} row(s) updated");
$status = $sync->statusMap();
if ($status !== []) {
$preview = collect($status)
->map(fn ($canEdit, $key) => "{$key}={$canEdit}")
->implode(', ');
$this->line(" runtime keys: {$preview}");
$this->line(" can_edit sample: {$preview}");
}
$violations = $sync->violations();
@@ -161,6 +161,11 @@ class DeploySettingsConstCommand extends Command
$this->warn(' WARN: runtime keys still can_edit≠1: '.implode(', ', array_keys($violations)));
}
$advancedViolations = $sync->advancedViolations();
if ($advancedViolations !== []) {
$this->warn(' WARN: advanced keys still can_edit≠0: '.implode(', ', array_keys($advancedViolations)));
}
$fee = \App\Models\Setting::query()
->where('key', 'fee_deduct_from_gold')
->first(['key', 'can_edit']);