UserController::account_info(); })->name('account'); $routes->post('/account', 'check_logged_in', function () { UserController::change_password(); }); $routes->get('/service', 'check_logged_in', function () { ServiceController::index(); })->name('services_index'); $routes->get('/service/:id/edit', 'check_user_is_manager', function ($id) { ServiceController::edit($id); })->name('service_edit'); $routes->post('/service/:id/edit', 'check_user_is_manager', function ($id) { ServiceController::update($id); }); $routes->get('/service/:id/reserve', 'check_logged_in', function ($id) { ServiceController::reservation($id); })->name('service_reserve'); $routes->post('/service/:id/reserve', 'check_logged_in', function ($id) { ServiceController::make_reservation($id); }); $routes->get('/service/add', 'check_user_is_manager', function () { ServiceController::add(); })->name('service_add'); $routes->post('/service/add', 'check_user_is_manager', function () { ServiceController::create(); }); $routes->get('/service/:id/delete', 'check_user_is_manager', function ($id) { ServiceController::confirm_delete($id); })->name('service_delete'); $routes->post('/service/:id/delete', 'check_user_is_manager', function ($id) { ServiceController::delete($id);