Name | Address | Type | Company | Phone Number | Additional Phone Number | Tags | Lead Source | Status | Created By | Assign To | Referral | Date | Action | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ trim($lead['address'] ?? '') }} {{ trim($lead['city'] ?? '') }}, {{ trim($lead['state'] ?? '') }} {{ trim($lead['zip_code'] ?? '') }} |
{{ $lead['leadType'] ?? '-' }} | {{ $lead['email'] ?? '-' }} | @php // Ensure tags is a valid JSON before decoding $tags = is_string($lead['tags']) ? json_decode($lead['tags'], true) : []; // Check if json_decode was successful and returned an array if (!is_array($tags)) { $tags = explode(",",$tags); // Set to empty array if decoding fails } @endphp @if (!empty($tags)) {{-- Show first two tags --}} @foreach(array_slice($tags, 0, 2) as $tag) {{ $tag }} @endforeach {{-- Show "More" button if more than 2 tags exist --}} @if (count($tags) > 2) @endif @else @endif | @php $leadSource = ucfirst(str_replace("_", " ", trim($lead['lead_source']))); $displayText = strlen($leadSource) > 12 ? substr($leadSource, 0, 12) . '...' : $leadSource; @endphp {{ $displayText }} | {{ $lead['lead_status'] ?? '-' }} | {{ $lead['created_user']['f_name'] ?? '' }} {{ $lead['created_user']['l_name'] ?? '' }} | {{ $lead['assigned_to']['f_name'] ?? 'Not Assigned' }} | {{ $lead['referral_name'] ?? '-' }} | |||||||
No Lead Found |