Пример #1
0
// Profile
$routes->get('/profile/edit', 'auth', function () {
    ProfileController::edit();
});
$routes->post('/profile/update', 'auth', function () {
    ProfileController::edit();
});
$routes->get('/profile/password', 'auth', function () {
    ProfileController::password();
});
$routes->post('/profile/password/update', 'auth', function () {
    ProfileController::updatePassword();
});
// Controlpanel
$routes->get('/controlpanel', 'admin', function () {
    AuthController::controlpanel();
});
// Users
$routes->get('/users', 'admin', function () {
    UsersController::index();
});
$routes->get('/users/create', 'admin', function () {
    UsersController::create();
});
$routes->post('/users/store', 'admin', function () {
    UsersController::store();
});
$routes->get('/users/:id/destroy', 'admin', function ($id) {
    UsersController::destroy($id);
});
// Roles