0
这里是我的配置我cortana-resources
路线:添加子路由到Zend框架模块控制器
'cortana-resources' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/cortana/resources',
'defaults' => array(
'controller' => 'Cortana\Controller\Resources',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
),
),
),
),
),
的cortana-resources
路由用于整个系统的参考http://127.0.0.1/cortana/public/cortana/resources
我想补充的一个add action
resources controller
下的Cortana
模块。我该如何做到这一点?它没有正确解决。
你想要什么URL,你目前得到什么错误?你目前的路由配置是'/ cortana/resources// /',这听起来不像你想要的那样。 –
我想''cortana/resources/add'引用'cortana'模块中的'ResourcesController'和'add'动作 – jkushner