security->getUser(); if (!$user instanceof User) { throw new AccessDeniedHttpException('Authentication required.'); } $this->notificationRepository->markAllReadByRecipient($user); return null; } }