32 lines
1.6 KiB
PHP
32 lines
1.6 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Modules\Employee\Http\Controllers\DepartmentController;
|
|
use Modules\Employee\Http\Controllers\DesignationController;
|
|
use Modules\Employee\Http\Controllers\EmployeeController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
Route::group(['middleware' => ['web', 'auth', 'permission'], 'prefix' => 'admin/'], function () {
|
|
Route::resource('employee', EmployeeController::class)->names('employee');
|
|
|
|
Route::post('department/reorder', [DepartmentController::class, 'reorder'])->name('department.reorder');
|
|
Route::get('department/toggle/{id}', [DepartmentController::class, 'toggle'])->name('department.toggle');
|
|
Route::get('department/{id?}', [DepartmentController::class, 'index'])->name('department.index');
|
|
Route::resource('department', DepartmentController::class)->names('department')->only(['store', 'edit', 'destroy']);
|
|
|
|
Route::post('designation/reorder', [DesignationController::class, 'reorder'])->name('designation.reorder');
|
|
Route::get('designation/toggle/{id}', [DesignationController::class, 'toggle'])->name('designation.toggle');
|
|
Route::get('designation/{id?}', [DesignationController::class, 'index'])->name('designation.index');
|
|
Route::resource('designation', DesignationController::class)->names('designation')->only(['store', 'edit', 'destroy']);
|
|
});
|