我使用的是我自己制作的Custom Bundle,我已经安装了FOSUserBundle。
在我的软件包中,我有UserEntity
,它有自己的控制器,并且它的前缀为/admin/user
。我希望路线admin_user_show
从FOSUserBundle:Profile:show
这是routing.yml的代码
admin_user_show:
path: /{id}/show
defaults: { _controller: "CMSBundle:User:show" }
methods: GET
我将其更改为此但我收到错误:
fos_user_profile_show:
path: /{id}/show
defaults: { _controller: "FOSUSerBundle:Profile:show" }
methods: GET
这是我得到的错误:
The "FOSUSerBundle" (from the _controller value "FOSUSerBundle:Profile:show") does not exist or is not enabled in your kernel! Did you mean "FOSUserBundle:Profile:show"?
如何将FOSUserBundle包含在我的Bundle中? 提前谢谢!
答案 0 :(得分:1)
在我看来,你的路由中有一个拼写错误:
FOSUSerBundle:Profile:show
代替FOSUserBundle:Profile:show
(请注意,在您的情况下,用户中的S是大写)