|
|
@@ -8,9 +8,30 @@ require __DIR__ . '/../vendor/autoload.php'; |
|
|
|
|
|
|
|
$app = AppFactory::create(); |
|
|
|
|
|
|
|
$app->get('/hello/{name}', function (Request $request, Response $response, array $args) { |
|
|
|
$name = $args['name']; |
|
|
|
$response->getBody()->write("Hello, $name"); |
|
|
|
|
|
|
|
$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("Blog met slug"); |
|
|
|
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; |
|
|
|
}); |
|
|
|
|