Beispiel #1
0
    InvoiceController::accept_invoice($id);
})->name('invoice_accept');
$routes->get('/invoice/:id/delete', 'check_user_is_manager', function ($id) {
    InvoiceController::delete_invoice_confirm($id);
})->name('invoice_delete');
$routes->post('/invoice/:id/delete', 'check_user_is_manager', function ($id) {
    InvoiceController::delete_invoice($id);
});
$routes->get('/invoice/create/:user_id', 'check_logged_in', function ($user_id) {
    InvoiceController::create_invoice_confirm($user_id);
})->name('invoice_create');
$routes->post('/invoice/create/:user_id', 'check_logged_in', function ($user_id) {
    InvoiceController::create_invoice($user_id);
});
$routes->post('/invoice/:invoice_id/deleteitem/:item_id', 'check_user_is_manager', function ($invoice_id, $item_id) {
    InvoiceController::delete_invoice_item($invoice_id, $item_id);
})->name('invoice_deleteitem');
$routes->get('/users', 'check_user_is_manager', function () {
    UserAdminController::index();
})->name('users_index');
$routes->get('/users/:id/edit', 'check_user_is_manager', function ($id) {
    UserAdminController::edit_user($id);
})->name('users_edit');
$routes->post('/users/:id/edit', 'check_user_is_manager', function ($id) {
    UserAdminController::save_user_edit($id);
});
$routes->get('/users/add', 'check_user_is_manager', function () {
    UserAdminController::new_user();
})->name('new_user');
$routes->post('/users/add', 'check_user_is_manager', function () {
    UserAdminController::save_new_user();