src/PHPDish/Bundle/PostBundle/Controller/CategoryController.php
public function unFollowAction($slug)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $category = $this->getCategoryManager()->findCategoryBySlug($slug);
        $this->getCategoryManager()->unFollowCategory($category, $this->getUser());
        $view = $this->view([
            'follower_count' => $category->getFollowerCount(),
        ]);

        return $this->handleView($view);
    }
public function unFollowAction($slug)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $category = $this->getCategoryManager()->findCategoryBySlug($slug);
        $this->getCategoryManager()->unFollowCategory($category, $this->getUser());
        $view = $this->view([
            'follower_count' => $category->getFollowerCount(),
        ]);

        return $this->handleView($view);
    }
取消关注话题.

@Route("/categories/{slug}/followers", name="category_unfollow")
@Method("DELETE")

@param string $slug

@return Response