23 lines
629 B
PHP
23 lines
629 B
PHP
<?php
|
|
use Psr\Http\Message\ResponseInterface as Response;
|
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
|
use Slim\Factory\AppFactory;
|
|
use Slim\Views\Twig;
|
|
use Slim\Views\TwigMiddleware;
|
|
|
|
require __DIR__ . '/vendor/autoload.php';
|
|
$app = AppFactory::create();
|
|
$twig = Twig::create('content/themes/fipamo-default-redux', ['cache' => 'cache']);
|
|
$app->add(TwigMiddleware::create($app, $twig));
|
|
|
|
$app->get('/', function (Request $request, Response $response, $args) {
|
|
|
|
$view = Twig::fromRequest($request);
|
|
return $view->render($response, 'index.twig', [
|
|
'name' => 'Ro',
|
|
'occupation'=>'That Dude'
|
|
]);
|
|
});
|
|
|
|
$app->run();
|