{{-- Left: Breadcrumb --}}
{{-- Right: Actions --}}
@if (Auth::user()->hasRole('Super admin'))
Back to General
@endif @php $user = auth()->user(); $notifications = $user ? $user->notifications()->latest()->take(20)->get() : collect(); $unreadCount = $user ? $user->unreadNotifications()->count() : 0; @endphp {{-- Notification dropdown --}}
@if (auth()->check())
{{ $unreadCount }}
@endif
{{-- Header --}}
Notifications
Mark all as read
{{-- Notification List --}}
@forelse ($notifications as $notification)
{{ $notification->data['title'] ?? 'Notification' }}
{{ $notification->data['message'] ?? 'You have a new notification' }}
{{ $notification->created_at->diffForHumans() }}
@empty
No notifications yet
@endforelse
{{-- Footer --}}
See All Notification
{{-- Profile dropdown --}}
@php $user = Auth::user(); $profileImage = $user->staff->staff_photo ?? asset('assets/images/logo-icon.png'); @endphp
{{ Auth::user()?->full_name ?? (Auth::user()?->first_name ?? 'Guest') }}
Log Out
@push('scripts') @endpush