Initial Slim setup with Twig views

This commit is contained in:
2022-07-09 13:14:08 -04:00
parent 97cd64b611
commit 899dc431b8
9 changed files with 323 additions and 51 deletions

10
app/routes.php Normal file
View File

@ -0,0 +1,10 @@
<?php
use Slim\Psr7\Request;
use Slim\Psr7\Response;
use Slim\Views\Twig;
$app->get('/', function (Request $request, Response $response, array $args) {
$view = Twig::fromRequest($request);
return $view->render($response, 'index.twig');
});