src/PHPDish/Bundle/UserBundle/Controller/UserController.php
public function unFollowAction($username)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $manager = $this->getUserManager();
        $user = $manager->findUserByName($username);
        $view = $this->view();
        $manager->unFollowUser($user, $this->getUser());
        $view->setStatusCode(static::HTTP_OK)->setData([
            'follower_count' => $user->getFollowerCount(),
        ]);

        return $this->handleView($view);
    }
public function unFollowAction($username)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $manager = $this->getUserManager();
        $user = $manager->findUserByName($username);
        $view = $this->view();
        $manager->unFollowUser($user, $this->getUser());
        $view->setStatusCode(static::HTTP_OK)->setData([
            'follower_count' => $user->getFollowerCount(),
        ]);

        return $this->handleView($view);
    }
@Route("/users/{username}/followers", name="follower_delete")
@Method("DELETE")

@param string $username

@return Response