{{-- Ligne répétable du formulaire de profil. $type : experience | education | certification | language ; $i : index (ou __i__ pour le modèle JS) --}} @php $row = $row ?? []; $group = ['experience' => 'experiences', 'education' => 'education', 'certification' => 'certifications', 'language' => 'languages'][$type]; $err = fn (string $name) => $errors->first($group.'.'.$i.'.'.$name); $val = fn (string $name) => $row[$name] ?? ''; @endphp @switch($type) @case('experience')
{{ $err('title') }}
@endif{{ $err('company') }}
@endif{{ $err('start') }}
@endif{{ $err('end') }}
@endif{{ $err('description') }}
@endif{{ $err('degree') }}
@endif{{ $err('year') }}
@endif{{ $err('name') }}
@endif{{ $err('year') }}
@endif{{ $err('name') }}
@endif{{ $err('level') }}
@endif