I'm new to Zend-Framework3.
And migrating my ZF2 application to ZF3.
In this child routes are not working.
Here is router from my module.config.php
'router' => [
'routes' => [
'application' => [
'type' => Segment::class,
'options' => [
'route' => '/application',
'defaults' => [
'controller' => Controller\IndexController::class,
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'kk' => [
'type' => Literal::class,
'options' => [
'route' => 'kk',
'defaults' => [
'controller' => Controller\IndexController::class,
'action' => 'kk'
],
],
],
]
]
],
],
When I try to call /application/kk action. It generates 404 error.
Where am I wrong? Or do I have to register all actions manually?
No, you are just missing
/character in route valueAs long as action
kkexists, you should not get 404 error.If your routes are same as actions name. You can use
Segmenttype: