}); $routes->get('/user/:id', function ($id) { UserController::show($id); }); $routes->post('/user/:id', function ($id) { UserController::update($id); }); $routes->get('/user/:id/edit', function ($id) { UserController::edit($id); }); $routes->get('/user/:id/destroy', function ($id) { UserController::destroy($id); }); $routes->get('/group', function () { GroupController::index(); }); $routes->post('/group', function () { GroupController::store(); }); $routes->get('/group/new', function () { GroupController::create(); }); $routes->get('/group/:id', function ($id) { GroupController::show($id); }); $routes->post('/group/:id/destroy', function ($id) { GroupController::destroy($id); }); $routes->get('/group/:id/destroy', function ($id) { GroupController::destroy($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); }); $routes->post('/topics/:topic_id/', function ($topic_id) { MessageController::store($topic_id); }); $routes->get('/topics/:topic_id/:message_id/edit', function ($topic_id, $message_id) { MessageController::edit($message_id, $topic_id); }); $routes->post('/topics/:topic_id/:message_id/edit', function ($topic_id, $message_id) { MessageController::update($message_id, $topic_id); }); $routes->post('/topics/:topic_id/:message_id/delete', function ($topic_id, $message_id) { MessageController::delete($message_id, $topic_id);