@extends('backend.template.layouts.template-base') @section('title', 'Notifications - Broadcast List') @section('content')
@if(session('success'))
{{ session('success') }}
@endif
@forelse ($broadcasts as $b) @empty @endforelse
Title Message Channels WhatsApp Template Audience Last Sent Action
{{ $b->title }} {{ $b->message }} @foreach ($b->channels ?? [] as $ch) {{ $ch }} @endforeach @if ($b->wa_template_name) {{ $b->wa_template_name }} @if ($b->wa_header_type) header: {{ $b->wa_header_type }} @endif @else — @endif @php $audienceLabel = [ 'all' => 'All Customers', 'subscribed' => 'Active Subscribers', 'new' => 'New Customers', 'recent_buyers' => 'Recent Buyers', 'inactive' => 'Inactive Customers', 'first_order' => 'Never Ordered', 'specific' => 'User IDs', 'mobile' => 'Mobile Numbers', ][$b->audience] ?? $b->audience; @endphp {{ $audienceLabel }} @if ($b->audience_days && in_array($b->audience, ['new', 'inactive', 'recent_buyers'], true))
last {{ $b->audience_days }} days @endif
{{ $b->last_sent_at?->format('d/m/Y h:i A') ?? '—' }}
No broadcasts saved yet — create one with the "New Broadcast" button.
{{ $broadcasts->links() }}
@endsection @push('scripts') @endpush