Initial Slim setup with Twig views

This commit is contained in:
gballan committed 2022-07-09 13:14:08 -04:00
1 parent 97cd64b611
commit 899dc431b8
9 files changed
+323 -51

No files matched your search

+10
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');
});