@extends('admin.layouts.app') @section('title', 'Send Notifications') @section('page-title', 'Broadcast Notifications') @section('page-title-jp', 'お知らせを送信') @section('content') {{-- ── Flash message ───────────────────────────────────────────────── --}} @if (session('success'))
{{ session('success') }}
@endif {{-- ── Broadcast form ──────────────────────────────────────────────── --}}

Push Notification Broadcast

Send direct notifications to your users' devices.

{{ $subscriberCount }} Web Push
{{ $whatsappCount }} WhatsApp
@csrf
@error('title'){{ $message }}@enderror
@error('body'){{ $message }}@enderror
Where users will be redirected when they click the notification.
Also send to users on WhatsApp who don't have push subscriptions configured.
@if ($subscriberCount <= 0 && $whatsappCount <= 0)

No subscribers yet — wait until at least one user enables notifications.

@endif
{{-- ── Notification Log ────────────────────────────────────────────── --}}

Notification Log

Last 50 delivery attempts. Includes open rates tracking.

{{ $sentCount }} Sent {{ $failedCount }} Failed
@if ($logs->isEmpty())

No notifications sent yet. Broadcast something above to see delivery results here.

@else
@foreach ($logs as $log) {{-- User --}} {{-- Channel badge --}} {{-- Title --}} {{-- Status --}} {{-- Opened At --}} {{-- Error --}} {{-- Time --}} @endforeach
User Channel Notification Status Opened Error / Info Sent At
{{ $log->user->name ?? '—' }}
{{ $log->user->email ?? '' }}
@if ($log->channel === 'webpush') Web Push @elseif ($log->channel === 'whatsapp') WhatsApp @else {{ $log->channel }} @endif
{{ $log->title }}
{{ Str::limit($log->body, 50) }}
@if ($log->status === 'sent') Sent @else Failed @endif @if ($log->opened_at) {{ $log->opened_at->format('M d, H:i') }} @else @endif @if ($log->error)
{{ Str::limit($log->error, 200) }}
@else @endif
{{ $log->created_at->format('d M Y') }}
{{ $log->created_at->format('H:i:s') }}
@endif
@endsection