@for ($i = 0; $i < 5; $i++)
@endfor
{{-- List --}}
@if ($contacts->isEmpty())
No contacts found.
@else @foreach ($contacts as $c) @php $name = $c['name'] ?? ''; $type = $c['type'] ?? 'Client'; $email = $c['email'] ?? null; $phone = $c['phone'] ?? null; // tel: normalize (allow +, digits) $tel = $phone ? ('tel:' . preg_replace('/(?!^\+)[^\d]/', '', $phone)) : null; // wa.me wants digits only + country code $waDigits = $phone ? preg_replace('/\D/', '', $phone) : null; $wa = $waDigits ? "https://wa.me/{$waDigits}" : null; $initials = collect(preg_split('/\s+/', trim($name)))->filter()->take(2)->map(fn($p) => mb_strtoupper(mb_substr($p, 0, 1)))->join(''); if ($initials === '') $initials = '??'; @endphp @endforeach @endif