@php $id = $id ?? 'field-' . uniqid(); $label = $label ?? ''; $name = $name ?? ''; $type = $type ?? 'text'; $value = $value ?? old($name, $default ?? ''); $required = $required ?? false; $help = $help ?? null; $error = $error ?? null; $placeholder = $placeholder ?? ''; $disabled = $disabled ?? false; @endphp
@if($label) @endif @php $describedBy = $help ? $id . '-help' : null; @endphp @if($type === 'textarea') @elseif($type === 'select') @else @endif @if($help)
{{ $help }}
@endif @if($error)
{{ $error }}
@endif