salt-hub/app/bootstrap.php

18 lines
379 B
PHP
Raw Normal View History

2023-04-08 16:44:28 -04:00
<?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';