@php $user = $message->from != user()->id ? $message->fromUser : $message->toUser; @endphp @if ($message->toUser->unread_messages_count > 0) @php $unreadMessageCount = $message->toUser->unread_messages_count; @endphp @else @php $unreadMessageCount = $message->fromUser->unread_messages_count; @endphp @endif
$unreadMessageCount > 0, ]) href="javascript:;" data-name="{{ $user->name }}" data-user-id="{{ $user->id }}" data-unread-message-count="{{ $unreadMessageCount }}">
{{ $user->name }}

{{ $user->name }}

{{ \Carbon\Carbon::parse($message->created_at)->diffForHumans() }}

$unreadMessageCount > 0, 'font-weight-bold' => $unreadMessageCount > 0, ])>

{{ strip_tags($message->message) }}

@if ($unreadMessageCount > 0)
{{ $unreadMessageCount }}
@endif