@props(['inputs' => [], 'parentKey' => '']) @foreach ($inputs as $key => $value) @php($fieldName = $parentKey !== '' ? "{$parentKey}[{$key}]" : $key) {{-- 配列の場合は、コンポーネントを再起的に呼び出し --}} @if (is_array($value)) @else @endif @endforeach