created routes

This commit is contained in:
Jan Felix Wiebe 2019-11-15 21:59:47 +01:00
parent ab079df35d
commit 0eefc87fbf

View file

@ -14,3 +14,15 @@
$router->get('/', function () use ($router) { $router->get('/', function () use ($router) {
return $router->app->version(); return $router->app->version();
}); });
$router->group(['prefix' => 'api'], function () use ($router) {
$router->get('events', ['uses' => 'EventController@showAllAuthors']);
$router->get('events/{id}', ['uses' => 'EventController@showOneAuthor']);
$router->post('events', ['uses' => 'EventController@create']);
$router->delete('events/{id}', ['uses' => 'EventController@delete']);
$router->put('events/{id}', ['uses' => 'EventController@update']);
});