src/PHPDish/Bundle/NotificationBundle/Controller/NotificationController.php
public function index(Request $request)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $meta = $this->notificationManager->findNotificationMetadataPager($this->getUser(),null,
            $request->query->getInt('page', 1)
        );
        //将当前页置为已读
        $this->notificationManager->markAsSeen($meta->getCurrentPageResults());
        return $this->render($this->configuration->getTemplate('Notification:index.html.twig'), [
            'notificationMeta' => $meta,
        ]);
    }
public function index(Request $request)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $meta = $this->notificationManager->findNotificationMetadataPager($this->getUser(),null,
            $request->query->getInt('page', 1)
        );
        //将当前页置为已读
        $this->notificationManager->markAsSeen($meta->getCurrentPageResults());
        return $this->render($this->configuration->getTemplate('Notification:index.html.twig'), [
            'notificationMeta' => $meta,
        ]);
    }
当前用户的通知.

@Route("/notifications", name="notifications")

@param Request $request

@return Response