@extends('layouts.app') @section('title', 'Chat Conversation - Admin') @section('content')
{{ strtoupper(substr($conversation->user->name ?? 'U', 0, 1)) }}

{{ $conversation->user->name ?? 'Unknown User' }}

{{ $conversation->user->email ?? 'No email' }}

@csrf @method('PATCH')
Created: {{ $conversation->created_at->format('M j, Y g:i A') }}
Updated: {{ $conversation->updated_at->diffForHumans() }}
Status: {{ ucfirst($conversation->status) }}
Category: {{ $conversation->category ?? 'General' }}
Priority: {{ ucfirst($conversation->priority ?? 'normal') }}
@forelse($messages as $message)
@if($message->sender_type === 'user') {{ $message->user->name ?? 'Customer' }} @else {{ $message->admin->name ?? 'Admin' }} @endif {{ $message->created_at->format('g:i A') }}
@if($message->message_type === 'text')

{{ $message->message }}

@elseif($message->message_type === 'file') @endif @if($message->sender_type === 'user' && !$message->is_read)
Unread
@endif
@empty

No messages in this conversation yet.

@endforelse
@csrf

Conversation Actions

@csrf @method('PATCH')
@csrf @method('PATCH')
@csrf @method('PATCH')
@endsection