@extends('layouts.admin') @section('title', 'Chat Details - ' . ($chat->name ?? 'Chat')) @section('content')

{{ $chat->name ?? 'Chat Details' }}

View and manage chat messages

Chat Type

{{ ucfirst($chat->type) }}

Status

{{ $chat->is_active ? 'Active' : 'Inactive' }}

Messages

{{ $chat->messages_count ?? 0 }}

Participants ({{ $chat->participants_count ?? 0 }})
@forelse($chat->participants as $participant) @empty @endforelse
User Email Joined Last Read
{{ $participant->first_name }} {{ $participant->last_name }} {{ $participant->email }} @if($participant->pivot && $participant->pivot->joined_at) @if(is_string($participant->pivot->joined_at)) {{ \Carbon\Carbon::parse($participant->pivot->joined_at)->format('M d, Y H:i') }} @else {{ $participant->pivot->joined_at->format('M d, Y H:i') }} @endif @else N/A @endif @if($participant->pivot && $participant->pivot->last_read_at) @if(is_string($participant->pivot->last_read_at)) {{ \Carbon\Carbon::parse($participant->pivot->last_read_at)->diffForHumans() }} @else {{ $participant->pivot->last_read_at->diffForHumans() }} @endif @else Never @endif
No participants
Messages
@forelse($messages as $message)
{{ $message->sender->first_name }} {{ $message->sender->last_name }} {{ $message->sender->email }}
@if(is_string($message->created_at)) {{ \Carbon\Carbon::parse($message->created_at)->format('M d, Y H:i') }} @else {{ $message->created_at->format('M d, Y H:i') }} @endif @if($message->is_edited) Edited @endif

{{ $message->content }}

Type: {{ ucfirst($message->message_type) }}
@empty

No messages in this chat

@endforelse
@if($messages->hasPages()) @endif
@if($chat->is_active)
@csrf
@else
@csrf
@endif
@csrf @method('DELETE')
@endsection