move response logic to new view controller
This commit is contained in:
parent
59a8fc5164
commit
394b8d890c
2 changed files with 16 additions and 5 deletions
14
app/View/ViewController.php
Normal file
14
app/View/ViewController.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\View;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Slim\Views\Twig;
|
||||
|
||||
class ViewController
|
||||
{
|
||||
public function admin(Response $response, Twig $view): Response
|
||||
{
|
||||
return $view->render($response, 'admin.html.twig', []);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue