@foreach($conversationUsers as $conversationUser) @php if($conversationUser->sender_id == Auth::id()){ $receiver = $conversationUser->receiver; }else{ $receiver = $conversationUser->sender; } @endphp @if($conversationUser->job)
  • photo

    Job: {{Str::limit($conversationUser->job->job_title, 25)}}

    {{ $receiver->first_name .' '.$receiver->last_name }}

    {{ Str::limit($conversationUser->last_message?->message ?? 'No messages yet', 25) }}

    {{ optional($conversationUser->last_message)->created_at ? \Carbon\Carbon::parse(optional($conversationUser->last_message)->created_at)->diffForHumans() : '' }}
  • @endif @endforeach