@props([ 'name' => 'client_id', 'clients', 'value' => null, 'inputId' => 'client_id', 'required' => true, 'label' => 'Client', 'placeholder' => 'Selectionner un client', 'searchPlaceholder' => 'Rechercher par nom ou societe…', ]) @php $selected = old($name, $value); $selectedStr = ($selected !== null && $selected !== '') ? (string) $selected : ''; $options = $clients->map(function ($c) { $company = $c->company_name ?? ''; return [ 'id' => (string) $c->id, 'label' => $c->name.' - '.$company, 'haystack' => mb_strtolower($c->name.' '.$company), ]; })->values()->all(); @endphp

Aucun client ne correspond.