18 lines
379 B
PHP
18 lines
379 B
PHP
|
<?php
|
||
|
|
||
|
use Slim\Factory\AppFactory;
|
||
|
use Slim\Views\Twig;
|
||
|
use Slim\Views\TwigMiddleware;
|
||
|
|
||
|
require __DIR__ . '/../vendor/autoload.php';
|
||
|
|
||
|
$app = AppFactory::create();
|
||
|
|
||
|
// Create Twig
|
||
|
$twig = Twig::create(__DIR__ . '/../views', ['cache' => false]);
|
||
|
// Add Twig-View Middleware
|
||
|
$app->add(TwigMiddleware::create($app, $twig));
|
||
|
|
||
|
// Register routes
|
||
|
require_once __DIR__ . '/routes.php';
|