You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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();
|