@php $messageText = ''; $message = $contact->messages()->latest()->where(function($q) { $q->where('status', 1)->orWhere('is_drip', 0); }); if($inboxView == 1): $message = $message->where('sid', $tabID); endif; $message = $message->first(); if($message): $messageText = $message->message; endif; $contactID = encryptStr($contact->id); @endphp
@php $unreadCnt = getUnreadCount($contact->phone,$contact->id,$inboxView,$tabID); @endphp @if($unreadCnt) {{ $unreadCnt }} @endif