@extends('layouts.app') @section('title', 'Modifier mon profil') @section('content') @php // Après une erreur de validation, on réaffiche la saisie ; sinon les données enregistrées. $old = fn (string $key, $default = null) => session()->hasOldInput() ? old($key) : $default; $skillsText = $old('skills', implode(', ', $profile->skills ?? [])); $contractSel = (array) ($old('contract_types', $profile->contract_types ?? []) ?? []); $sectorSel = (array) ($old('sectors', $profile->sectors ?? []) ?? []); $availability = $old('availability', $profile->availability); $L = fn (string $k) => \App\Models\UserProfile::limit($k, $isPremium); $hint = fn (string $k) => $isPremium ? 'Maximum : '.$L($k).'.' : 'Profil gratuit : '.$L($k).' maximum.'; $sections = [ 'experience' => ['key' => 'experiences', 'rows' => (array) ($old('experiences', $profile->experiences ?? []) ?? []), 'add' => 'Ajouter une expérience'], 'education' => ['key' => 'education', 'rows' => (array) ($old('education', $profile->education ?? []) ?? []), 'add' => 'Ajouter une formation'], 'certification' => ['key' => 'certifications', 'rows' => (array) ($old('certifications', $profile->certifications ?? []) ?? []), 'add' => 'Ajouter une certification'], 'language' => ['key' => 'languages', 'rows' => (array) ($old('languages', $profile->languages ?? []) ?? []), 'add' => 'Ajouter une langue'], ]; $linkRows = array_values((array) ($old('links', $profile->links ?? []) ?? [])); @endphp
← Retour au profil

Modifier mon profil

Tous les champs sont facultatifs, sauf votre nom. Vous pouvez compléter votre profil petit à petit.

@if ($errors->any()) Le profil n'a pas été enregistré. Corrigez les champs signalés ci-dessous puis réessayez. @endif @include('profile._contact') @include('profile._media') @if ($user->isPremium()) @include('profile._map') @else

Apparaître sur la carte

Cette fonctionnalité est réservée aux abonnés Premium.

Découvrir Premium
@endif
@csrf @method('PUT') {{-- ============ Identité ============ --}}
Identité et contact
@error('name')

{{ $message }}

@enderror
@error('email')

{{ $message }}

@enderror

Ce numéro vous sert à vous connecter : il ne peut pas être modifié ici.

{{-- ============ Présentation ============ --}}
Présentation
@error('headline')

{{ $message }}

@enderror

0 / 1500

@error('bio')

{{ $message }}

@enderror
@error('city')

{{ $message }}

@enderror
@if ($isWorker) {{-- ============ Disponibilité et recherche ============ --}} {{-- ============ Compétences ============ --}}
Compétences

{{ $hint('skills') }} @unless ($isPremium) Passer à Premium pour en ajouter davantage.@endunless

@error('skills')

{{ $message }}

@enderror
{{-- ============ Rubriques répétables ============ --}} @foreach ([ 'experience' => ['pf-experiences', 'Expériences professionnelles'], 'education' => ['pf-education', 'Formations et diplômes'], 'certification' => ['pf-certifications', 'Certifications'], 'language' => ['pf-languages', 'Langues parlées'], ] as $type => [$anchor, $title]) @php $sec = $sections[$type]; $max = $L($sec['key']); @endphp
{{ $title }}

{{ $hint($sec['key']) }}

@error($sec['key'])

{{ $message }}

@enderror
@foreach (array_values($sec['rows']) as $i => $row) @include('profile._row', ['type' => $type, 'i' => $i, 'row' => (array) $row]) @endforeach
@endforeach {{-- ============ Liens ============ --}} @php $maxLinks = $L('links'); @endphp @endif
Annuler Enregistrer
@endsection