@php // Presentation grouping only. Every catalog setting still renders: anything not listed here falls into "Other settings". $groups = [ ['title' => 'Risk monitoring', 'description' => 'When the platform raises an alert for staff to review.', 'keys' => ['wallet_risk_alert_threshold']], ]; $grouped = collect($groups)->flatMap(fn ($group) => $group['keys'])->all(); $leftover = collect(array_keys($catalog))->reject(fn ($key) => in_array($key, $grouped, true))->values()->all(); if ($leftover !== []) { $groups[] = ['title' => 'Other settings', 'description' => null, 'keys' => $leftover]; } $hints = [ 'wallet_risk_alert_threshold' => 'A manual wallet adjustment at or above this many coins raises a high-priority risk alert for review.', ]; @endphp
@if ($formError) {{ $formError }} @endif Saving updates these settings for the whole platform right away. Each change is recorded in the audit log with its previous and new value.
@foreach ($groups as $group) @foreach ($group['keys'] as $key) @php $spec = $catalog[$key]; $label = \Illuminate\Support\Str::before($spec['label'], ' — '); $hint = $hints[$key] ?? (str_contains($spec['label'], ' — ') ? ucfirst(\Illuminate\Support\Str::after($spec['label'], ' — ')) : null); @endphp @if ($spec['type'] === 'string_list') @else @endif @endforeach @endforeach
Save settings