I'm working on a ZF2 project, and using ZfcUser to manage website users. I just want to know is it possible to have a child route to the zfcuser route? Something like that, in the configuration of my module:
return [
'router' =>
[
'routes' =>
[
'admin' =>
[
'type' => 'Segment',
'options' =>
[
'route' => '/admin',
'defaults' =>
[
'__NAMESPACE__' => 'admin',
'controller' => 'admin.index',
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' =>
[
'zfcuser' =>
[
'type' => 'Literal',
'options' =>
[
'route' => '/account',
]
],
],
],
],
],
];
This is a problem I've tried overcoming recently, not using ZfcUser but whilst developing my own modules. There are a few solutions but the most suitable would depend on the type of application you're developing.
The easiest solution would be to override the
zfcuserroute path and prefixing it withadmin.If you're like me and want all you
adminroutes contained under a single route then you're better off removing thezfcuserroute completely and implementing your own which could utilize the ZfcUser controllers.