【发布时间】:2015-04-24 09:59:29
【问题描述】:
我想为交易控制器的所有操作删除交易/交易:
http://example.com/deal/deals/voucher/dsfsdfdf 应该是http://example.com/voucher/cPH5aGr1
等等
【问题讨论】:
-
需要更多信息
-
1.什么版本? 2. 阅读Routing(假设版本 2) 3. 尝试一下,然后分享您的代码以及为什么它不起作用。
-
我已经为每个动作单独购买应用路由,例如:Router::connect('/deal_listing/*', array('plugin'=>'deal' , 'controller' => '交易','行动' => 'deal_listing')); Router::connect('/deal/add/*', array('plugin'=>'deal' , 'controller' => 'deals', 'action' => 'add')); Router::connect('/business/add/*', array('plugin'=>'deal' , 'controller' => 'business', 'action' => 'add'));有什么方法可以让我不必为每个动作单独写一行?