<?php $routes->get('/', function () { HelloWorldController::index(); }); $routes->get('/hiekkalaatikko', function () { HelloWorldController::sandbox(); }); $routes->get('/hero', function () { HeroController::lista(); }); $routes->post('/hero', function () { HeroController::store(); }); $routes->get('/hero/new', function () { HeroController::create(); }); $routes->get('/hero/:id', function ($id) { HeroController::show($id); }); $routes->get('/hero/:id/edit', function ($id) { HeroController::edit($id); }); $routes->post('/hero/:id/edit', function ($id) { HeroController::update($id); }); $routes->get('/login', function () { // Kirjautumislomakkeen esittäminen UserController::login(); }); $routes->post('/login', function () {