TuoteController::store(); }); $routes->get('/tuote/uusi', 'check_logged_in', function () { TuoteController::create(); }); $routes->get('/tuote/:id', function ($id) { TuoteController::show($id); }); $routes->get('/tuotteet', function () { TuoteController::tuotelista(); }); $routes->get('/tuote/:id/edit', 'check_logged_in', function ($id) { TuoteController::edit($id); }); $routes->post('/tuote/:id/edit', 'check_logged_in', function ($id) { TuoteController::update($id); }); $routes->post('/tuote/:id/remove', 'check_logged_in', function ($id) { TuoteController::remove($id); }); //sisäänkirjautuminen ja käyttäjiin liittyvät polut $routes->get('/kirjaudu', function () { UserController::login(); }); $routes->post('/kirjaudu', function () { UserController::handle_login(); }); $routes->post('/uloskirjautuminen', function () { UserController::logout(); }); $routes->post('/kayttaja', function () {