// MySomethingController.php
// look no s
public function getSomethingAction($args)
{
...
}
// 路由.yml
my_something:
type: rest
resource: Blah\Bundle\BlahBundle\Controller\MySomethingController
跑步:
php app/console router:debug
输出:
[router] Current routes
Name Method Pattern
get_something GET /somethings/{args}.{_format}
为什么路线是“somethings”(复数加一个“s”)而不是“something”?
这是我在某个地方的设置吗?还是这是预期的?