@extends('admin/layouts/layout') @section('title', "Chat History") @section('page-style') @endsection @section('page-script') @endsection @section('content')

Orders

@foreach($chats as $chat) @endforeach
User Session ID Conversation Date Time Actions
@if($chat->user_id) {{$chat->user->email}} @endif {{$chat->session}} @php $qna = json_decode("[" . $chat->messages . "]", true); // check decording JSON if (json_last_error() !== JSON_ERROR_NONE) { $qna = []; } @endphp
@foreach($qna as $item)
Q: {{ htmlspecialchars($item['Q'], ENT_QUOTES, 'UTF-8') }}
A: {!! nl2br(strip_tags($item['A'])) !!}
@endforeach
{{ $chat->first_created_at }}
@endsection