UserController::handleRegister(); }); $routes->post('/logout', function () { UserController::logout(); }); $routes->post('/groups/new', function () { GroupController::store(); }); $routes->post('/groups/:group_id/new', function ($group_id) { TopicController::store($group_id); }); $routes->get('/groups/:group_id', function ($group_id) { ForumController::topics($group_id); }); $routes->get('/groups/:group_id/edit', function ($group_id) { GroupController::edit($group_id); }); $routes->post('/groups/:group_id/edit', function ($group_id) { GroupController::update($group_id); }); $routes->post('/groups/:group_id/expel/:user_id', function ($group_id, $user_id) { GroupController::expel($group_id, $user_id); }); $routes->post('/groups/:group_id/invite', function ($group_id) { GroupController::invite($group_id); }); $routes->post('/groups/:group_id/delete', function ($group_id) { GroupController::destroy($group_id); }); $routes->get('/topics/:topic_id', function ($topic_id) { ForumController::topic($topic_id);