Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Test\ModuleOne\config\module.config.php
- <?php
- namespace Test\ModuleOne;
- use Zend\Router\Http\Literal;
- use Zend\Router\Http\Segment;
- use Zend\ServiceManager\Factory\InvokableFactory;
- return [
- 'controllers' => [
- 'factories' => [
- Controller\IndexController::class => InvokableFactory::class,
- ],
- ],
- 'router' =>[
- 'routes'=>[
- 'one'=>[
- 'type' => Segment::class,
- 'options' =>[
- 'route' => '/one[/:action[/:id]]',
- 'constraints' =>[
- 'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
- 'id' => '[0-9]+',
- ],
- 'defaults'=>[
- 'controller' => Controller\IndexController::class,
- 'action' => 'index',
- ]
- ]
- ]
- ],
- ],
- ];
Add Comment
Please, Sign In to add comment