i'm new to zend framework 2 and was trying to add the album module into ZF2's skelton application but getting A 404 error occurred Page not found. The requested URL could not be matched by routing. my Album/config/module.config.php code is
<?php
return array(
'controllers' => array(
'invokables' => array(
'Album\Controller\Album' => 'Album\Controller\AlbumController',
),
),
'view_manager' => array(
'template_path_stack' => array(
'album' => __DIR__ . '/../view'
),
),
'router' => array(
'routes' => array(
'album' => array(
//'type' => 'segment',
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
//'route' => '/album[/][:action][/:id]',
//'route' => '/:controller[.:formatter][/:id]',
'route' => '/album',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'formatter' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'__NAMESPACE__' => 'Album\Controller',
'controller' => 'Album\Controller\Album',
'action' => 'index',
),
),
),
),
),
);
and in Application/config/module.config.php i have added these lines:
'modules' => array(
'Application',
'Album'
),
'module_listener_options' => array(
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
'module_paths' => array(
'./module',
'./vendor',
),
),
can anyone plz help me to correct the codes...