IngredientController::showIngredient($aines_id); }); $routes->get('/ingredients', 'check_logged_in', function () { IngredientController::listIngredients(); }); $routes->post('/ingredients', 'check_logged_in', function () { IngredientController::store(); }); $routes->post('/ingredients/:aines_id/destroy_ingredient', function ($aines_id) { IngredientController::destroy($aines_id); }); $routes->get('/ingredients/:aines_id/edit_ingredient', 'check_logged_in', function ($aines_id) { IngredientController::editIngredient($aines_id); }); $routes->post('/ingredients/:aines_id/edit_ingredient', function ($aines_id) { IngredientController::update($aines_id); }); $routes->get('/drinks/:drinkki_id/edit', 'check_logged_in', function ($drinkki_id) { DrinksController::edit($drinkki_id); }); $routes->post('/drinks/:drinkki_id/edit', function ($drinkki_id) { DrinksController::update($drinkki_id); }); $routes->post('/drinks/:drinkki_id/destroy', function ($drinkki_id) { DrinksController::destroy($drinkki_id); }); $routes->get('/drinks_list', function () { HelloWorldController::drinks_list(); }); $routes->get('/drinks_show', function () { HelloWorldController::drinks_show();