@php
use App\Services\Notifications\NotificationService;
$cats = NotificationService::CATEGORIES;
$chips = [
'all' => ['All', null],
'unread' => ['Unread'.($unread ? ' · '.$unread : ''), 'fa-circle'],
'task' => ['Tasks', 'fa-square-check'],
'approval' => ['Approvals', 'fa-stamp'],
'group' => ['Groups', 'fa-people-group'],
'content' => ['Content', 'fa-pen-field'],
'moderation' => ['Moderation', 'fa-message-exclamation'],
'donation' => ['Donations', 'fa-hand-holding-heart'],
'system' => ['System', 'fa-heart-pulse'],
];
@endphp
{{ $unread }} unread
$unread === 0])>
Mark all read
{{-- Feed --}}
@foreach ($chips as $key => [$label, $ic])
@if ($ic) @endif{{ $label }}
@endforeach
@if ($unread > 0)
Mark all read
@endif
@forelse ($groups as $group)
{{ $group['day'] }} {{ $group['items']->count() }}
@foreach ($group['items'] as $n)
@if ($n['unread'])
@endif
{{ $n['title'] }}
{{ $n['text'] }}
{{ $n['when'] }}
@endforeach
@empty
{{ $filter === 'unread' ? 'No unread notifications — you’re all caught up.' : 'Nothing here right now.' }}
@endforelse
{{-- Preferences + digest --}}
Notification preferences
@foreach ($cats as $key => $meta)
@php $on = ($prefs[$key] ?? true) !== false; $ct = $catCounts[$key] ?? 0; @endphp
@endforeach
Delivery
@foreach (NotificationService::CHANNELS as $ch => $meta)
@php $on = ($prefs['ch_'.$ch] ?? true) !== false; @endphp
@endforeach
Daily digest
@if ($unread)
You have {{ $unread }} unread notification{{ $unread === 1 ? '' : 's' }}.
@else
You’re all caught up.
@endif
A summary email is sent each morning at 08:00 to {{ $recipient }}.
Send me a preview