@extends('layouts.admin') @section('title', 'Admin Chat Management') @section('content')

Chats Management

Monitor and manage all chats and conversations

Total Chats

{{ $stats['total'] ?? 0 }}

Active

{{ $stats['active'] ?? 0 }}

Total Messages

{{ $stats['messages'] ?? 0 }}

Active Users

{{ $stats['active_users'] ?? 0 }}

@if(isset($chats)) @forelse($chats as $chat) @empty @endforelse @else @endif
Chat Name Type Members Messages Status Last Message Created Actions
{{ $chat->name ?? 'N/A' }}
{{ Str::limit($chat->description ?? '', 40) }}
{{ ucfirst($chat->type ?? 'direct') }} {{ $chat->participants_count ?? 0 }} {{ $chat->message_count ?? 0 }} {{ $chat->is_active ? 'Active' : 'Inactive' }} @if($chat->last_message_at) {{ $chat->last_message_at->diffForHumans() }} @else Never @endif {{ $chat->created_at ? $chat->created_at->format('M d, Y') : 'N/A' }} @if($chat->is_active)
@csrf
@else
@csrf
@endif
@csrf @method('DELETE')
No chats found.
Unable to load chats
@if(isset($chats) && method_exists($chats, 'total')) Showing {{ $chats->firstItem() ?? 0 }} to {{ $chats->lastItem() ?? 0 }} of {{ $chats->total() }} chats @else No data available @endif
@if(isset($chats) && method_exists($chats, 'hasPages') && $chats->hasPages()) {{ $chats->links() }} @endif
@endsection