@extends('layouts/layoutMaster') @section('title', __('Chat with') . ' ' . $otherUser->name) @section('vendor-style') @vite(['resources/assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.scss']) @endsection @section('content')

{{ __('Chats') }} / {{ $otherUser->name }}

@if($otherUser->getFirstMediaUrl('image')) {{ $otherUser->name }} @else {{ substr($otherUser->name, 0, 1) }} @endif
{{ $otherUser->name }}
{{ $otherUser->phone }}
@foreach($messages as $message) @php $isMine = $message->receiver_id != auth()->id(); @endphp
@if($message->content)

{{ $message->content }}

@endif @if($message->media && $message->media->count() > 0)
@foreach($message->media as $media)
@if(str_starts_with($media->mime_type, 'image/')) {{ $media->name }} @else {{ $media->name }} @endif
@endforeach
@endif {{ $message->created_at->format('H:i') }} @if($isMine) @endif
@endforeach
@push('scripts') @endpush @endsection