Chats
@foreach($chatroomdetails as $chatroomdetail)
@php
$investor_id = $chatroomdetail->investor_id;
$inventor_id = $chatroomdetail->inventor_id;
if($investor_id == Auth::user()->id){
$sen_id = $inventor_id;
}else{
$sen_id = $investor_id;
}
@endphp
@php
$ch = DB::table('chat')->where('chat_id', $chatroomdetail->chat_id )->orderBy('id','DESC')->limit('1')->get();
@endphp
@endforeach
@else
Name | Date | Last Message | Chat |
---|---|---|---|
@foreach($users as $user)
@if($user->id == $sen_id)
@php $idu = Crypt::encrypt($user->id); @endphp
@if(!empty($user->profile_image))
![]() | @php if(count($ch)>0){ foreach($ch as $c){ echo $c->created_at; } }else{ echo "-"; } @endphp | @php if(count($ch)>0){ foreach($ch as $c){ echo $c->msg; } }else{ echo "No Message"; } @endphp | @php $not = DB::table('chat_notification')->where('user_id', Auth::user()->id )->where('chat_id', $chatroomdetail->chat_id )->where('status', '0' )->orderBy('id','DESC')->get(); @endphp @php $ide = Crypt::encrypt($chatroomdetail->id); @endphp Chat @if(count($not)>0)@php echo count($not); @endphp@endif |
 }})
Oops!
You haven't started chat with anyone yet!