@php $mobileUser = auth('mobile')->user(); $userName = $mobileUser?->contact?->full_name ?: $mobileUser?->username ?: $mobileUser?->email ?: 'Client'; $notifications = [ [ 'title' => 'Welcome to the client portal', 'body' => 'Your mobile dashboard is ready to use.', 'time' => 'Just now', 'unread' => true, ], [ 'title' => 'POPIA accepted', 'body' => 'Your privacy notice acceptance was recorded successfully.', 'time' => '2h ago', 'unread' => true, ], [ 'title' => 'Newsletter published', 'body' => 'A new compliance update newsletter is available to read.', 'time' => 'Yesterday', 'unread' => false, ], ]; $unreadCount = collect($notifications)->where('unread', true)->count(); @endphp
Licentia

{{ $pageTitle ?? 'Mobile Portal' }}

{{ $userName }}

@if ($unreadCount > 0) {{ $unreadCount }} @endif

Notifications

Sample data
@foreach ($notifications as $notification)

{{ $notification['title'] }}

@if ($notification['unread']) @endif

{{ $notification['body'] }}

{{ $notification['time'] }}

@endforeach
@csrf