get('/login', function ($request, $response, $args) { // Render index view return $this->renderer->render($response, 'login.phtml', $args); }); $app->post('/login', function ($request, $response, $args) { // Render index view $post = $request->getParsedBody(); try { $resp = $this->auth->login($post['rekeningnr'], $post['pascode']); if ($resp) { echo "HIER EEN REDIRECT GRAAG"; } else { echo "ERR PASS!"; } } catch (\Exception $e) { echo "ERR REK!"; } die(); }); } }