@extends('admin.adminLayout') @section('admin_page_title') Message Center @endsection @section('style') @endsection @section('script') @endsection @section('admin_content')

Website Message Center

Review enquiries from public contact forms, identify matched clients, and manage every message from one organized inbox.

@can('contact_messages_edit')
@csrf @method('PATCH')
@endcan
@php $allCount = (int) ($counts['all'] ?? 0); $unreadCount = (int) ($counts['unread'] ?? 0); $matchedCount = (int) ($counts['matched'] ?? 0); $unmatchedCount = max(0, $allCount - $matchedCount); @endphp
Inbox messages {{ number_format($allCount) }} Normal messages in your accessible inbox
Unread {{ number_format($unreadCount) }} Messages that still require review
Matched clients {{ number_format($matchedCount) }} Senders linked to an existing client record
Unmatched senders {{ number_format($unmatchedCount) }} New or unknown email addresses
@include('admin.contact_messages.partials.moderation-navigation')
Search and filter messages
Reset
@if($messages->count())
@foreach($messages as $message) @php $initials = collect(preg_split('/\s+/', trim($message->full_name ?: 'Unknown Sender'))) ->filter() ->take(2) ->map(fn ($part) => strtoupper(mb_substr($part, 0, 1))) ->implode(''); @endphp @endforeach
Sender Subject and context Client relationship Status Received Actions
{{ $initials ?: '?' }}
{{ $message->full_name ?: 'Unknown sender' }} {{ $message->email }}
{{ $message->subject ?: 'Website enquiry' }} {{ \Illuminate\Support\Str::limit($message->message, 150) }} @if($message->isQuarantined()) Review score {{ $message->spam_score }}/100 · {{ \App\Support\ContactSpamClassifier::reasonLabel(($message->spam_reasons ?? [])[0] ?? '') }} @endif @if($message->duplicate_count > 0) {{ $message->duplicate_count }} repeat submission(s) suppressed @endif
@if($message->client) {{ $message->client->full_name ?: 'Client #'.$message->client_id }} Owner: {{ $message->owner?->name ?: 'Not assigned' }} @else Unmatched email @endif {{ ucfirst($message->status) }}
{{ optional($message->created_at)->format('d M Y') }} {{ optional($message->created_at)->format('H:i') }} · {{ optional($message->created_at)->diffForHumans() }}
@include('admin.contact_messages.partials.moderation-action', ['record' => $message, 'compact' => true]) @can('contact_messages_edit')
@csrf @method('PATCH')
@endcan @can('contact_messages_delete')
@csrf @method('DELETE')
@endcan
@else
{{ $folder === 'quarantine' ? 'No quarantined messages' : 'No messages found' }}

No contact messages match the selected filters.

@endif
@endsection