<?php

namespace Administratio\Config\Config;

// Create a new instance of our RouteCollection class.
$routes->group("{locale}/admin", ["namespace" => "\Modules\Administration\Controllers", 'filter' => ['appAuth', 'group:secretaire,admin']], function ($routes) {
    //Routes for users
    $routes->get("user", "User::index");
    $routes->post("user", "User::add");
    $routes->get("users", "User::get");
    $routes->post("users/data", "User::fecth");
    $routes->get("enableDesable/(:num)/(:num)", "User::enableDesable");
    $routes->get("user/(:num)", "User::edit"); 
    $routes->post("user/(:num)", "User::saveEdit"); 
    
    //Routes for groupes
    $routes->get("groupes", "Groupes::index");

    //Routes for permissions
    $routes->get("permissions", "Permissions::index");

});