@include('partials.favicon') @stack('styles') @php $user = auth()->user(); $unread = $user->unreadNotifications()->count(); $pendingCount = $user->hasRole('admin', 'staff') ? \App\Models\Appointment::where('status', 'pending')->when(! $user->isAdmin(), fn ($q) => $q->where('host_id', $user->id))->count() : 0; $openAlerts = $user->isAdmin() ? \App\Models\SecurityAlert::open()->count() : 0; @endphp
@if($openAlerts && ! request()->routeIs('security-alerts.*')) {{ $openAlerts }} open security {{ Str::plural('alert', $openAlerts) }} need attention. View and acknowledge → @endif @include('partials.flash') @yield('content')
@stack('scripts')