diff --git a/app/controllers/front.php b/app/controllers/front.php index 1eb7af9..a27ef3c 100644 --- a/app/controllers/front.php +++ b/app/controllers/front.php @@ -1,15 +1,18 @@ get('/', function () use ($app) { +// $front->get('/', function () use ($app) { - $entries = $app['entry_api']->getEntries('unread'); +// $entries = $app['entry_api']->getEntries('unread'); - return $app['twig']->render('index.twig', array('entries' => $entries)); -}); +// return $app['twig']->render('index.twig', array('entries' => $entries)); +// }); + +$front->get('/', 'Poche\Controller\EntryController::indexAction'); $front->get('/view/{id}', function (Request $request, $id) use ($app) { diff --git a/src/Poche/Controller/EntryController.php b/src/Poche/Controller/EntryController.php new file mode 100644 index 0000000..991be4e --- /dev/null +++ b/src/Poche/Controller/EntryController.php @@ -0,0 +1,20 @@ +getEntries('unread'); + + return $app['twig']->render('index.twig', array('entries' => $entries)); + } +}