{{-- resources/views/agent/leads/partials/social.blade.php --}} @php // Ensure we always have a collection to avoid "undefined variable" errors $rows = isset($socialLeads) ? collect($socialLeads) : collect(); @endphp
Social Media Leads
@if ($rows->isEmpty())

No leads have been collected from social media yet.

@else
@foreach ($rows as $lead) @endforeach
Name Email Phone Platform Submitted
{{ trim(($lead->first_name ?? '') . ' ' . ($lead->last_name ?? '')) ?: '—' }} {{ $lead->email ?? '—' }} {{ $lead->phone_number ?? '—' }} {{ $lead->platform ?? 'Unknown' }} @if (!empty($lead->created_at)) {{ optional($lead->created_at)->diffForHumans() }} @else — @endif
@endif