@php /** * Notifications Center content — shared by the customer account page and every dashboard * role. Lists the signed-in user's notifications (paginated, All/Unread filter), lets them * open/delete each one and run bulk actions, and edit their per-user notification settings. * All actions are plain CSRF-protected forms (work without JS); the bell's live polling is * handled separately by notifications.js. * * @var array $rows Paginated notification rows. * @var array $pager paginate() result. * @var int $unread Unread count. * @var string $filter 'all' | 'unread'. * @var array $prefs The user's notification preferences (row or defaults). * @var string $base This page's path (e.g. '/admin/notifications'). * @var string $role The viewer's role (controls which categories show). */ $rows = $rows ?? []; $pager = $pager ?? paginate(0, 20); $unread = (int) ($unread ?? 0); $filter = ($filter ?? 'all') === 'unread' ? 'unread' : 'all'; $prefs = $prefs ?? notification_prefs_defaults(); $base = $base ?? '/account/notifications'; $role = $role ?? (\App\Support\Auth::user()['role'] ?? ''); $baseUrl = url(ltrim($base, '/')); $cats = notification_categories(); // Hosts that already title the region above this card pass false; the default keeps the // heading, which is load-bearing wherever the card sits inside a tab panel. $showHeading = $showHeading ?? true; @endphp
{!! $filter === 'unread' ? t('notif.empty_unread') : t('notif.empty_all') !!}