0

起初对不起我的英语不好。

我想为这个 url 定义路由:

例如我的控制器在“/app/Controller/ Services /TypesController.php”

我的控制器有 2 个动作

索引()和属性();

如何为这个 url 定义路由:

/服务/类型/属性

/服务/类型/索引

4

1 回答 1

0

您不能在 /Controller 中创建子文件夹

这只是

/app/Controller/TypesController.php

网址结果:

/types/action/

或者 - 你可以把它变成一个插件:

/app/Plugin/Services/Controller/TypesController.php

网址结果:

/services/types/action/

但那是很好的记录:http ://book.cakephp.org/2.0/en/plugins.html

于 2012-04-03T18:53:57.800 回答