@php $type = $item['tipo']; $field = $item['campo']; $width = $item['largura'] ?? null; $hasDesc = ! empty($item['desc']); /** * Real column name. Stripping the group prefix guesses right for almost * every field, but settings.setting_notify keeps the prefix in the table, * and guessing left it unfilled and unsaved. */ $col = $item['col'] ?? preg_replace('/^(site_|setting_)/', '', $field); /** * Which table the value belongs to. The name prefix is only a default: * side and side_pages carry no prefix and would fall into settings by * luck rather than by decision. */ $group = $item['group'] ?? (str_starts_with($field, 'site_') ? 'site' : 'settings'); @endphp @if($type === 'switch') @elseif($type === 'select' && $hasDesc)
{{ $item['label'] }} {{ $item['desc'] }}
@elseif($type === 'checks')
@foreach($item['options'] as $value => $text) @endforeach
@else @endif