【发布时间】:2013-04-27 01:53:12
【问题描述】:
我的默认控制器将路由“/”设置为运行索引:
public function indexAction() {
if ($this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {
//render the logged in view(s)
$response = $this->render('Pan100MoodLogBundle:Default:index.html.twig');
} else {
//redirect to the login controller
$response = $this->redirect($this->generateUrl('login'));
}
return $response;
}
但是 Symfony 找不到路由:
路由“登录”不存在。 500 内部服务器错误 - RouteNotFoundException
有什么问题吗?我正在使用 FOSUserBundle。
【问题讨论】:
标签: php symfony fosuserbundle