@extends('front.layout.master') @section('title','View Chat: '.$conversation->conv_id.' | ') @section('stylesheet') @endsection @section('body')
@include('user.sidebar')

{{ __('View Chat : ') }}{{$conversation->conv_id}}

@if($conversation->sender_id == auth()->id()) {{__("Chat with")}} {{ $conversation->reciever->name }} @else {{__("Chat with")}} {{ $conversation->sender->name }} @endif

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

{{$chat->message}}

@endif

{{ $chat->created_at->format('d-m-Y - h:i A') }}

@else
@if($chat->type == 'media' ) {{ $chat->media }} @else

{{$chat->message}}

@endif

{{ $chat->created_at->format('d-m-Y - h:i A') }}

@endif @empty

{{__("Start a conversation with ")}} @if($conversation->sender_id == auth()->id()) {{ $conversation->reciever->name }} @else {{ $conversation->sender->name }} @endif

@endforelse
@endsection @section('script') @endsection