{{-- 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')
Expérience
@if ($err('title'))

{{ $err('title') }}

@endif
@if ($err('company'))

{{ $err('company') }}

@endif
@if ($err('start'))

{{ $err('start') }}

@endif
@if ($err('end'))

{{ $err('end') }}

@endif
@if ($err('description'))

{{ $err('description') }}

@endif
@break @case('education')
Formation
@if ($err('degree'))

{{ $err('degree') }}

@endif
@if ($err('year'))

{{ $err('year') }}

@endif
@break @case('certification')
Certification
@if ($err('name'))

{{ $err('name') }}

@endif
@if ($err('year'))

{{ $err('year') }}

@endif
@break @case('language')
Langue
@if ($err('name'))

{{ $err('name') }}

@endif
@if ($err('level'))

{{ $err('level') }}

@endif
@break @endswitch