AsiakasController::showProfile($asiakasid);
});
$routes->get('/profile', 'check_logged_in', function () {
    AsiakasController::viewProfile();
});
$routes->post('/profiledeletion', 'check_logged_in', function () {
    AsiakasController::deleteProfile();
});
$routes->get('/profile/edit', 'check_logged_in', function () {
    AsiakasController::editProfile();
});
$routes->post('/profile/edit', 'check_logged_in', function () {
    AsiakasController::updateProfile();
});
$routes->post('/logout', function () {
    AsiakasController::logout();
});
// Viesti routes
$routes->get('/messages', 'check_logged_in', function () {
    ViestiController::allMessages();
});
$routes->get('/messages/:viestiid', 'check_logged_in', function ($viestiid) {
    ViestiController::showMessage($viestiid);
});
$routes->get('/messages/newmessage', 'check_logged_in', function () {
    ViestiController::newMessage();
});
$routes->post('/messages/newmessage', 'check_logged_in', function () {
    ViestiController::store();
});
$routes->get('/messages/editmessage/:viestiid', 'check_logged_in', function ($viestiid) {
Exemple #2
0
    AsiakasController::store();
});
$routes->get('/asiakas/uusi', function () {
    AsiakasController::create();
});
$routes->get('/asiakas/:id/muokkaa', function ($id) {
    AsiakasController::edit($id);
});
$routes->post('/asiakas/:id/muokkaa', function ($id) {
    AsiakasController::update($id);
});
$routes->post('/asiakas/:id/poista', function ($id) {
    AsiakasController::destroy($id);
});
$routes->get('/asiakas/:id/omat_tiedot', function ($id) {
    AsiakasController::ownShow($id);
});
$routes->get('/varaus', function () {
    VarausController::index();
});
$routes->post('/varaus', function () {
    VarausController::store();
});
$routes->get('/varaus/uusi', function () {
    VarausController::create();
});
$routes->get('/varaus/:id', function ($id) {
    VarausController::show($id);
});
$routes->get('/varaus/:id/muokkaa', function ($id) {
    VarausController::edit($id);