【发布时间】:2012-08-23 06:47:50
【问题描述】:
有人能指点我这是怎么做到的吗?我想在插件文件夹本身的配置文件中定义插件特定的路由。
目前我只是在我的主 routes.php 文件中定义插件的路由。这显然会变得很长。所以我想将它重构为一个单独的配置文件并将其放在插件的文件夹中。
但我看到有一个代码实际上会自动加载特定于插件的路由,但我找不到任何关于此的文档。 在“config/routes.php”中有一行写着
/**
* Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.
*/
CakePlugin::routes();
通过插件路由搜索here 是完全不同的主题。而plugin documentation 对此只字未提。
【问题讨论】:
标签: php cakephp plugins routing routes