# Router not displaying views

**URL:** <https://discourse.laminas.dev/t/router-not-displaying-views/3192>\
**Category:** Components & MVC\
**Tags:** laminas-mvc, laminas-router\
**Created:** [February 8, 2023, 9:54pm UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192 "2023-02-08T21:54:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AzafoCossa](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AzafoCossa](https://discourse.laminas.dev/u/AzafoCossa)\
**Post date:** [February 8, 2023, 9:54pm UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/1 "2023-02-08T21:54:27Z")

</div>

Hi everyone!  
I am trying to set up a basic routing in my system, but it seems not to work.

The application loads fine, no errors are displayed.  
Here is `module.config.php` file.

```auto
use Application\Controller\CustomersController;
use Application\Controller\OrdersController;
use Laminas\Router\Http\Literal;
use Laminas\Router\Http\Segment;
use Laminas\ServiceManager\Factory\InvokableFactory;

return [
    'router' => [
        'routes' => [
            'home' => [
                'type' => Literal::class,
                'options' => [
                    'route' => '/',
                    'defaults' => [
                        'controller' => Controller\IndexController::class,
                        'action' => 'index',
                    ],
                ],
            ],
            'application' => [
                'type' => Segment::class,
                'options' => [
                    'route' => '/application[/:action]',
                    'defaults' => [
                        'controller' => Controller\IndexController::class,
                        'action' => 'index',
                    ],
                ],
            ],
            'orders' => [
                'type' => Literal::class,
                'options' => [
                    'route' => '/orders',
                    'defaults' => [
                        'controller' => OrdersController::class,
                        'action' => 'index',
                    ],
                ],
            ],
            'customers' => [
                'type' => Literal::class,
                'options' => [
                    'route' => '/customers',
                    'defaults' => [
                        'controller' => CustomersController::class,
                        'action' => 'index',
                    ],
                ],
            ],
        ],
    ],
    'controllers' => [
        'factories' => [
            Controller\IndexController::class => InvokableFactory::class,
            Controller\OrdersController::class => InvokableFactory::class,
            CustomersController::class => InvokableFactory::class,
        ],
    ],
    'view_manager' => [
        'display_not_found_reason' => true,
        'display_exceptions' => true,
        'doctype' => 'HTML5',
        'not_found_template' => 'error/404',
        'exception_template' => 'error/index',
        'template_map' => [
            'layout/layout' => __DIR__. '/../view/layout/layout.phtml',
            'application/index/index' => __DIR__. '/../view/application/index/index.phtml',
            'error/404' => __DIR__. '/../view/error/404.phtml',
            'error/index' => __DIR__. '/../view/error/index.phtml',
        ],
        'template_path_stack' => [
            __DIR__. '/../view',
        ],
    ],
];

```

The view directory structure is this:  
view  
\_\_\_\_application  
\_\_\_\_\_\_\_\_customers  
\_\_\_\_\_\_\_\_\_\_\_\_index.phtml  
\_\_\_\_\_\_\_\_index  
\_\_\_\_\_\_\_\_\_\_\_\_index.phtml  
\_\_\_\_\_\_\_\_orders  
\_\_\_\_\_\_\_\_\_\_\_\_index.phtml  
\_\_\_\_error  
\_\_\_\_layout

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [February 9, 2023, 7:55am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/2 "2023-02-09T07:55:09Z")

</div>

> [@AzafoCossa](#):
>
> …no errors are displayed.

Have you activated the [develeopment mode](https://docs.laminas.dev/tutorials/getting-started/skeleton-application/#development-mode)?

---

<div class="post-metadata">

**Author:** ![AzafoCossa](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AzafoCossa](https://discourse.laminas.dev/u/AzafoCossa)\
**Post date:** [February 9, 2023, 8:01am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/3 "2023-02-09T08:01:01Z")

</div>

Still not showing anything!

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [February 9, 2023, 8:04am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/4 "2023-02-09T08:04:20Z")

</div>

Do you only get a white page or some error messages?

(Please remember, we can’t look at your screen, so details are important. 😉)

---

<div class="post-metadata">

**Author:** ![AzafoCossa](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AzafoCossa](https://discourse.laminas.dev/u/AzafoCossa)\
**Post date:** [February 9, 2023, 8:05am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/5 "2023-02-09T08:05:25Z")

</div>

White pages, for all the routes except for the home route shipped with the installation.

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [February 9, 2023, 8:05am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/6 "2023-02-09T08:05:40Z")

</div>

Please check also the error reporting:

[https://www.php.net/manual/en/function.error-reporting.php](https://www.php.net/manual/en/function.error-reporting.php)

> **[The Skeleton Application - tutorials - Laminas Docs](https://docs.laminas.dev/tutorials/getting-started/skeleton-application/#error-reporting)**
>
> Learn how to create laminas-mvc applications, get in-depth guides into components, and discover how to migrate your applications to version 3!

---

<div class="post-metadata">

**Author:** ![Kanek\_Sulub](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/kanek_sulub/32/1471_2.png) [@Kanek\_Sulub](https://discourse.laminas.dev/u/Kanek_Sulub)\
**Post date:** [April 11, 2023, 5:13am UTC](https://discourse.laminas.dev/t/router-not-displaying-views/3192/7 "2023-04-11T05:13:28Z")

</div>

you can try clearing the cache in data/cache folder or just rename the cache file
