@extends('page') @section('content')

@if ($message = Session::get('success'))
{{ $message }}
@endif

{{$chat_details->from->name}}({{$chat_details->product->product_name.'/'.$chat_details->code }} )

@foreach($chat_details->messages as $messages) @if($messages->type == 0)
{{$chat_details->from->name}} {{date('d M h:i a',strtotime($messages->date))}}
message user image
@if($messages->chat_file != '') @php $file_extension = substr($messages->chat_file, strrpos($messages->chat_file, '.') + 1); @endphp @if(in_array($file_extension,['png','jpg','jpeg'])) @else @endif @else {{$messages->message}} @endif
@elseif($messages->type == 1)
{{$chat_details->to->name}} {{date('d M h:i a',strtotime($messages->date))}}
message user image
@if($messages->chat_file != '') @php $file_extension = substr($messages->chat_file, strrpos($messages->chat_file, '.') + 1); @endphp @if(in_array($file_extension,['png','jpg','jpeg'])) @else @endif @else {{$messages->message}} @endif
@endif @endforeach

Guidelines

Guidelines comes here.
@endsection