@php $setting = $config['form']['sidebar']['setting']['input']; $k_last = array_key_last($setting); @endphp
@foreach ($setting as $k_s => $s) @if (!empty($s['status'])) @php $chk_req = !empty($s['validate']); @endphp
@if ($s['type'] == 'checkbox') @php $chk = !empty($data) ? $data->{$k_s} == 1 : true; @endphp @elseif ($s['type'] == 'selection') @php $chk_option = !empty($data->{$k_s}) ? $data->{$k_s} : 1; @endphp @if (!empty($s['options'])) @foreach ($s['options'] as $k_o => $o) @endforeach @endif @elseif ($s['type'] == 'select') @php $key = explode('_', $k_s); if (count($key) > 1) { $key = $key[0]; } $selected = $data->{$key} ?? null; @endphp @elseif ($s['type'] == 'input') @endif
@endif @endforeach