<?php

/**
 * prefix admin/auth
 * as admin.auth.
 */

use Illuminate\Support\Facades\Route;
use Src\Modules\Auth\Laravel\Controllers\AdminFormController;
use Src\Modules\Auth\Laravel\Controllers\AdminsListController;

Route::group(['as' => 'admin.auth.', 'prefix' => 'admin/auth'], function(){

    Route::group(['as' => 'admins.', 'prefix' => 'admins'], function(){
        Route::get('/list', [AdminsListController::class, 'list'])->name('list');
        Route::get('/form', [AdminFormController::class, 'form'])->name('form');
        Route::get('/delete', [AdminsListController::class, 'delete'])->name('deleteAdmin');
        Route::post('/create-request', [AdminFormController::class, 'createAdminRequest'])->name('createAdmin');
        Route::post('/update-request', [AdminFormController::class, 'updateAdminRequest'])->name('updateAdmin');
    });
});