@foreach($chats as $chat) @if($chat->sender_id == Auth::user()->id)
{{ $chat->msg }}
9:12 AM
@foreach($allusers as $alluser) @if($sender_id == $alluser->id) @if(!empty($alluser->profile_image)) @else @endif @else @endif @endforeach
@else
{{ $chat->msg }}
@foreach($allusers as $alluser) @if($receiver_id == $alluser->id) @if(!empty($alluser->profile_image)) @else @endif @else @endif @endforeach
9:12 AM
@endif @endforeach