therselman 7 years ago
parent
commit
af3d696aed
  1. 1
      src/config/container.php
  2. 1
      src/controllers/AdminController.php
  3. 1
      src/elements/index/view.php
  4. 12
      src/layouts/public.php

1
src/config/container.php

@ -40,6 +40,7 @@ return [
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
// $whoops->pushHandler(new \Whoops\Handler\JsonResponseHandler); // $whoops->pushHandler(new \Whoops\Handler\JsonResponseHandler);
$whoops->register(); $whoops->register();
$c->request->execute_route(require __DIR__ . '/routes.php'); $c->request->execute_route(require __DIR__ . '/routes.php');
}, },

1
src/controllers/AdminController.php

@ -4,7 +4,6 @@ class AdminController extends Controller
{ {
function indexAction() function indexAction()
{ {
} }
function clubAction($id) function clubAction($id)

1
src/elements/index/view.php

@ -0,0 +1 @@
Hello World

12
src/layouts/public.php

@ -48,9 +48,15 @@ return function($response)
'<body>' . '<body>' .
'<div class="container">'; '<div class="container">';
require __DIR__ . '/../elements/' . $response->elements['header'] . '/view.php'; // require __DIR__ . '/../elements/' . $response->elements['header'] . '/view.php';
require __DIR__ . '/../elements/' . $response->elements['content'] . '/view.php'; // require __DIR__ . '/../elements/' . $response->elements['content'] . '/view.php';
require __DIR__ . '/../elements/' . $response->elements['footer'] . '/view.php'; // require __DIR__ . '/../elements/' . $response->elements['footer'] . '/view.php';
$path = $response->container->config['paths']['elements'];
require $path . $response->elements['header'] . '/view.php';
require $path . $response->elements['content'] . '/view.php';
require $path . $response->elements['footer'] . '/view.php';
echo echo
'</div>' . '</div>' .

Loading…
Cancel
Save