@yield('page-title', 'Dashboard')
{{ now()->format('d M Y') }}
{{-- Notification Bell --}}
@php
$unreadCount = \App\Models\Notification::where('user_id', auth()->id())->whereNull('read_at')->count();
$recentNotifs = \App\Models\Notification::where('user_id', auth()->id())->latest()->take(6)->get();
@endphp
{{-- Header --}}
Notifications
@if($unreadCount > 0)
{{ $unreadCount }}
@endif
@if($unreadCount > 0)
@endif
{{-- List --}}
@forelse($recentNotifs as $notif)
@empty
No notifications yet
@endforelse
{{-- Footer --}}
Logout
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@yield('content')