I'm using ZfcUser module for Zend Framework 2 In Controller folder Controller
--UserController.php
--EmployerController.php
In module.config.php, I config with route
'router' => array(
'routes' => array(
'zfcuser' => array(
'type' => 'Literal',
'priority' => 1000,
'options' => array(
'route' => '/user',
'defaults' => array(
'controller' => 'zfcuser',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'employer' => array(
'type' => 'Literal',
'options' => array(
'route' => '/employer',
'defaults' => array(
'controller' => 'ZfcUser\Controller\Employer',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'edit' => array(
'type' => 'Segment',
'options' => array(
'route' => '/edit[/:id]',
'constraints' => array(
'id' => '[0-9]+'
),
'defaults' => array(
'controller' => 'ZfcUser\Controller\Employer',
'action' => 'edit'
)
),
),
),
),
),
),
),
),
When I run link: domain.com/user/employer/edit/1
=> error: Route with name "edit" does not have child routes
=> How to fix it