@foreach ($schema as $key => $def)
@php
[$label, $rules, $type] = $def;
$help = $def[3] ?? null;
$field = str_replace('.', '__', $key);
$current = $values[$key] ?? null;
if ($type === 'lines' && is_array($current)) { $current = implode("\n", $current); }
$required = in_array('required', $rules, true);
@endphp
@if (in_array($type, ['textarea', 'lines'], true))
@else
@endif
@if ($help)
{{ $help }}
@endif
@error($field)
{{ $message }}
@enderror