1. Define the route.
On your config, either local.php, global.php or module.config.php, write the following code,
'your_route' => array(
'type' => 'Literal',
'options' => array(
'route' => '/your/route',
'defaults' => array(
'__NAMESPACE__' => 'Your\Controller',
'controller' => 'Route',
'action' => 'index',
),
),
.... some more routing options
)
2. Call the route.
On your module->controller->action where you want to redirect to 'your_route', write the following,
return $this->redirect()->toRoute('your_route');
No comments:
Post a Comment