@extends('admin.layouts.main') @push('styles') @endpush @section('content')

Chat Management

@if(session('success')) @endif
@forelse($chats as $chat) @empty @endforelse
# User Email Status Assigned To Last Message Started Actions
{{ $loop->iteration }} {{ $chat->user_name }} {{ $chat->user_email }} @if($chat->status === 'pending') Pending @elseif($chat->status === 'active') Active @else Closed @endif @if($chat->assignedAdmin) {{ $chat->assignedAdmin->name }} @else Unassigned @endif @if($chat->latestMessage) {{ Str::limit($chat->latestMessage->message, 50) }} @else No messages @endif {{ $chat->created_at->format('M d, Y h:i A') }} View
No chats found
@if($chats->hasPages())
{{ $chats->links() }}
@endif
@endsection