@props([ 'maxNotifications' => 5, 'showMarkAllRead' => true, 'showViewAll' => true, ]) @php $user = auth()->check() ? auth()->user() : null; $notifications = $user ? $user->notifications()->limit($maxNotifications)->get() : collect(); $unreadCount = $user ? $user->unreadNotifications()->count() : 0; @endphp @if(!$user) @else @push('styles') @endpush @push('scripts') @endpush @endif