update setting
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user