Zend Framework2 route

Discussion in 'PHP' started by antras2007, 4 Feb 2015.

  1. antras2007

    antras2007 New Member

    Joined:
    4 Jul 2013
    Messages:
    33
    Likes Received:
    0
    Reputations:
    0
    Подскажите кто знает, что с этими маршрутами не так?
    PHP:
    <?php

    return array( 
        
    'controllers' => array(
            
    'invokables' => array(
                
    'Admin\Controller\Index' => 'Admin\Controller\IndexController',
                
    'category' => 'Admin\Controller\CategoryController',
            ),
        ),
        
        
    'router' => array(
            
    'routes' => array(
                
    'admin' => array(
                    
    'type' => 'literal',
                    
    'options' => array(
                        
    'route'    => '/admin/',
                        
    'defaults' => array(
                            
    'controller' => 'Admin\Controller\Index',
                            
    'action'     => 'index',
                        ),
                    ),
                    
    'may_terminate' => true,

                    
    'child_routes' => array(
                        
    'category' =>array(
                            
    'type' => 'segment',
                            
    'options' => array(
                                
    'route' => 'category/[:action/][:id/]',
                                
    'defaults' => array(
                                    
    'controller' => 'category',
                                    
    'action' => 'index'
                                
    )
                            )
                        ),
                    ),
                ),
                

            ),
        ),
        
        
    'view_manager' => array(
            
    'template_path_stack' => array(
                
    __DIR__ '/../view',
            ),
        ),
    );
    При вызове маршрута zblog.local/admin/category/

    выдает

    Zend\View\Renderer\PhpRenderer::render: Unable to render template "admin/category/index"; resolver could not resolve to a file

    не тут не вижу ошибку и не понимаю чего zendу не нравится.
     
  2. antras2007

    antras2007 New Member

    Joined:
    4 Jul 2013
    Messages:
    33
    Likes Received:
    0
    Reputations:
    0
    Сори, уже разобрался!!!!!