@php $notifications = \App\Models\UserNotification::where('user_id', auth()->id())->orderBy('created_at', 'desc')->get(); $isUnread = $notifications->where('is_read', 0)->count(); @endphp