@extends('layouts.app') @section('title', 'Newsletter Subscribers') @section('nav_newsletter', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Newsletter Subscribers') @section('page_subtitle', 'People who subscribed via the public website') @section('content') @if(session('success'))
{{ session('success') }}
@endif {{-- Stats + actions bar --}}
All {{ $counts['all'] }} Active {{ $counts['active'] }} Unsubscribed {{ $counts['unsubscribed'] }}
{{-- Search --}}
@if($filter !== 'all') @endif @if($search) Clear @endif
{{-- Export --}} Export CSV
{{-- Table --}}
@if($subscribers->isEmpty())

@if($search) No subscribers match "{{ $search }}". @else No subscribers yet. The subscribe form is live on the public website. @endif

@else @foreach($subscribers as $sub) @endforeach
Subscriber Status Subscribed IP Address Actions

{{ $sub->email }}

@if($sub->name)

{{ $sub->name }}

@endif
@if($sub->active) Active @else Unsubscribed @endif

{{ $sub->subscribed_at->format('M j, Y') }}

{{ $sub->subscribed_at->format('g:i A') }}

{{ $sub->ip_address ?? '—' }}

@csrf @method('DELETE')
{{-- Pagination --}} @if($subscribers->hasPages())
{{ $subscribers->links() }}
@endif @endif
@endsection