Example #1
0
    UserController::updateUser($id);
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/favorites', function () {
    UserController::showFavorites();
});
$routes->get('/drink', function () {
    DrinkController::index();
});
$routes->get('/drink/:id', function ($id) {
    DrinkController::show($id);
});
$routes->get('/addDrink', function () {
    DrinkController::addNew();
});
$routes->post('/addDrink', function () {
    DrinkController::store();
});
$routes->post('/drink/:id/destroy', function ($id) {
    DrinkController::destroy($id);
});
$routes->get('/drink/:id/edit', function ($id) {
    DrinkController::edit($id);
});
$routes->post('/drink/:id/edit?', function ($id) {
    DrinkController::update($id);
});
$routes->get('/search', function () {
    DrinkController::showSearchPage();