with('unreadNotifications', UserNotification::where('user_id', Auth::id()) ->where('is_read', false) ->orderByDesc('created_at') ->get()); } else { $view->with('unreadNotifications', collect()); } } }