# How to render Dashboard after login, in Slim Framework route?

**URL:** https://discourse.slimframework.com/t/how-to-render-dashboard-after-login-in-slim-framework-route/1439
**Category:** Questions
**Created:** [April 25, 2017, 10:29am UTC](https://discourse.slimframework.com/t/how-to-render-dashboard-after-login-in-slim-framework-route/1439 "2017-04-25T10:29:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Qasmi](https://avatars.discourse-cdn.com/v4/letter/q/e9c0ed/32.png) [@Qasmi](https://discourse.slimframework.com/u/Qasmi)
#### Post date: [April 25, 2017, 10:29am UTC](https://discourse.slimframework.com/t/how-to-render-dashboard-after-login-in-slim-framework-route/1439/1 "2017-04-25T10:29:55Z")

</div>

I’m using the following route , after email and password verification i want to display the “dashboard.php” templete , … //which folder should have “dashboard.php” file be ?  
$app-\>post(’/userlogin’, function () use ($app) {  
verifyRequiredParams(array(‘email’, ‘password’));  
$email = $app-\>request-\>post(‘email’);  
$password = $app-\>request-\>post(‘password’);  
$db = new DbOperation();  
$response = array();  
$res=$db-\>userLogin($email, $password);  
if ($res==0) { // verifying email and password  
$app-\>render(‘dashboard.php’); //which folder should this template be ?  
});  
I have the following Error …  
_Type: RuntimeException_  
_Message: View cannot render `dashboard.php` because the template does not exist_  
_File: C:\xampp\htdocs\serverSideAdmin\libs\Slim\View.php_  
_Line: 272_

---

<div class="post-metadata">

### Author: ![lperry65](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/lperry65/32/333_2.png) [@lperry65](https://discourse.slimframework.com/u/lperry65)
#### Post date: [May 1, 2017, 10:11am UTC](https://discourse.slimframework.com/t/how-to-render-dashboard-after-login-in-slim-framework-route/1439/2 "2017-05-01T10:11:45Z")

</div>

Hi, I think the convention is to use /resources/views and have a layout folder in views folder for the master template. However there is no correct folder it’s up to you, have you looked at this it shows how to work with both Twig and PHP views:

[https://www.slimframework.com/docs/tutorial/first-app.html](https://www.slimframework.com/docs/tutorial/first-app.html)

I use MVC in my Slim apps so my code looks like this:

```
    return $this->view->render($response, 'admin/dashboard.twig');

```

Also take a look at [https://www.slimframework.com/docs/features/templates.html#the-slimphp-view-component](https://www.slimframework.com/docs/features/templates.html#the-slimphp-view-component)
