我最近在 Symfony 中安装了SgCalendarBundle,首先我创建了 sg_calendar 的路径:
//src MyBundle/config/routing.yml
sg_calendar:
pattern: /calendar
defaults: { _controller: SgCalendarBundle:Calendar:index }
但是当我使用标签执行我的页面时
<a class="brand" href="{{ path('sg_calendar') }}">SgCalendarBundle</a>
我在 symfony 中收到以下错误:Unable to generate a URL for the named route "sg_calendar_update_xhr_event" as such route does not exist.
500 Internal Server Error - RouteNotFoundException
.