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

1
src/controllers/AdminController.php

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

1
src/elements/index/view.php

@ -0,0 +1 @@ @@ -0,0 +1 @@
Hello World

12
src/layouts/public.php

@ -48,9 +48,15 @@ return function($response) @@ -48,9 +48,15 @@ return function($response)
'<body>' .
'<div class="container">';
require __DIR__ . '/../elements/' . $response->elements['header'] . '/view.php';
require __DIR__ . '/../elements/' . $response->elements['content'] . '/view.php';
require __DIR__ . '/../elements/' . $response->elements['footer'] . '/view.php';
// require __DIR__ . '/../elements/' . $response->elements['header'] . '/view.php';
// require __DIR__ . '/../elements/' . $response->elements['content'] . '/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
'</div>' .

Loading…
Cancel
Save