Skip to content

Instantly share code, notes, and snippets.

@ppeiris
Created July 13, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppeiris/95debc4a545ebd7c810f8d9864d45e70 to your computer and use it in GitHub Desktop.
Save ppeiris/95debc4a545ebd7c810f8d9864d45e70 to your computer and use it in GitHub Desktop.
<?php
$tarr = array(
'controllers' => array(
'invokables' => array(
'Login\Controller\Login' => 'Login\Controller\LoginController',
),
),
// The following section is new and should be added to your file
'router' => array(
'routes' => array(
'login' => array(
'type' => 'segment',
'options' => array(
'route' => '/login[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Login\Controller\Login',
'action' => 'index',
),
),
),
),
),
'view_manager' => array(
'template_path_stack' => array(
'login' => __DIR__ . '/../view',
),
),
);
return $tarr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment