@if($chats->count() > 0)
@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
{{$message->created_at->diffForHumans()}}
@endif {{-- 2--}}You haven't had any conversations yet