Exemplo n.º 1
0
<?php

$routes->get('/', function () {
    TaskController::index();
});
$routes->get('/task/', function () {
    TaskController::index();
});
$routes->post('/task', function () {
    TaskController::store();
});
$routes->get('/task/new', function () {
    TaskController::create();
});
$routes->get('/task/:id', function ($id) {
    TaskController::show($id);
});
$routes->post('/task/:id', function ($id) {
    TaskController::update($id);
});
$routes->post('/task/:id/destroy', function ($id) {
    TaskController::destroy($id);
});
$routes->get('/task/:id/edit', function ($id) {
    TaskController::edit($id);
});
$routes->get('/task/:id/markasdone', function ($id) {
    TaskController::markasdone($id);
});
$routes->get('/task/:id/markasundone', function ($id) {
    TaskController::markasundone($id);