diff --git a/app/controllers/front.php b/app/controllers/front.php index a2ba3c0..cd9fe3c 100644 --- a/app/controllers/front.php +++ b/app/controllers/front.php @@ -6,7 +6,7 @@ use Symfony\Component\HttpFoundation\Request; $front = $app['controllers_factory']; $front->get('/', function () use ($app) { - $entries = $app['entry_api']->getEntries(); + $entries = $app['entry_api']->getEntries('unread'); return $app['twig']->render('index.twig', array('entries' => $entries)); }); @@ -49,4 +49,11 @@ $front->match('/add', function (Request $request) use ($app) { }) ->bind('add'); +$front->get('/archive', function () use ($app) { + + $entries = $app['entry_api']->getEntries('read'); + + return $app['twig']->render('archive.twig', array('entries' => $entries)); +}); + return $front;