|
|
@@ -13,4 +13,34 @@ $app->get('/hello/{name}', function (Request $request, Response $response, array |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$response->getBody()->write("index"); |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/blog/{slug}', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$response->getBody()->write("Blog met slug"); |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/login', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$response->getBody()->write("login"); |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/postcomment', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$response->getBody()->write("Postcomment"); |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/blog/create', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$response->getBody()->write("Blog create"); |
|
|
|
return $response; |
|
|
|
}); |
|
|
|
|
|
|
|
$app->run(); |