<?php

use Illuminate\Support\Facades\Route;
use Sargilla\Flatlab4\Controllers\UserController;
use Sargilla\Flatlab4\Controllers\RolesController;
use Sargilla\Flatlab4\Controllers\PermisosController;

Route::group(['middleware' => 'web', 'prefix' => config('flatlab4.prefix')], function () {
    Route::prefix('usuarios')->group(function () {
        Route::resource('users', UserController::class);
        Route::get('getUsers', [UserController::class, 'getUsers'])->name('getUsers');

        Route::resource('roles', RolesController::class);
        Route::get('getRoles', [RolesController::class, 'getRoles'])->name('getRoles');

        Route::resource('permisos', PermisosController::class);
        Route::get('getPermisos', [PermisosController::class, 'getPermisos'])->name('getPermisos');
    });
});
