@extends('front.layout.master') @php $authUser = Auth::user(); $sellerac = App\Store::where('user_id','=', $authUser->id)->first(); $other = $conversation->sender_id == auth()->id() ? $conversation->reciever : $conversation->sender; $otherImg = $other && $other->image && file_exists(public_path() . '/images/user/' . $other->image) ? url('images/user/' . $other->image) : ($other ? Avatar::create($other->name)->toBase64() : ''); @endphp @section('title','View Chat: ' . $conversation->conv_id . ' | ') @section('stylesheet') @endsection @section('body')
{{-- Chat header --}}
@if($otherImg)@endif

{{ $other->name ?? __('User') }}

#{{ $conversation->conv_id }}
{{-- Messages --}}
@forelse($conversation->chat as $chat) @if(auth()->id() != $chat->user_id)
@if($chat->type == 'media') @else

{{ $chat->message }}

@endif
{{ $chat->created_at->format('d M, h:i A') }}
@else
@if($chat->type == 'media') @else

{{ $chat->message }}

@endif
{{ $chat->created_at->format('d M, h:i A') }}
@endif @empty

{{ __('Start a conversation with') }} {{ $other->name ?? '' }}

@endforelse
{{-- Input --}}
@include('front.partials.change-password-modal') @endsection @section('script') @endsection