• {{-- --}} @if($chat->user->profile_picture && file_exists(public_path('ProfilePicture/' . $chat->user->profile_picture))) user-img @else user-img @endif
    @if ($chat->chat_media && count($chat->chat_media) > 0) @foreach ($chat->chat_media as $media) @if (in_array($media->file_type, ['jpg', 'png', 'jpeg', 'gif', 'webp', 'mp4', 'webm', 'ogv', 'avi', 'mov', 'mkv'])) @elseif($media->file_type == 'wav') @else {{ $media->filename }} @endif @endforeach @endif

    @if (!empty($chat->message)) {!! makeLinks($chat->message) !!} @endif

    @if ($chat->is_viewed == 1) @else @endif {{ date('n/j/y h:i A', strtotime($chat->created_at)) }}

    {{ $chat->alternativeCredential ? $chat->alternativeCredential->first_name : $chat->user->username }}