@if($chats->count() > 0)
@foreach($chats as $chat)
withUser->id)}}">
{{$chat->withUser->getFullName()}}

@php $lastMessageIndex = $chat->messages->count(); if($lastMessageIndex==0){ $message = null; }else{ $message = $chat->messages[$lastMessageIndex-1]; } @endphp @if(!is_null($message)) {{str()->limit($message->message,46,)}} @else Click the mentor or mentee to have a chat,happy connecting... @endif

@if(!is_null($message))

{{$message->created_at->diffForHumans()}}

@endif {{-- 2--}}
@endforeach
@else

You haven't had any conversations yet

@endif