first change
This commit is contained in:
0
Modules/Employee/routes/.gitkeep
Normal file
0
Modules/Employee/routes/.gitkeep
Normal file
19
Modules/Employee/routes/api.php
Normal file
19
Modules/Employee/routes/api.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Employee\Http\Controllers\EmployeeController;
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------------------
|
||||
* API Routes
|
||||
*--------------------------------------------------------------------------
|
||||
*
|
||||
* Here is where you can register API routes for your application. These
|
||||
* routes are loaded by the RouteServiceProvider within a group which
|
||||
* is assigned the "api" middleware group. Enjoy building your API!
|
||||
*
|
||||
*/
|
||||
|
||||
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
|
||||
Route::apiResource('employee', EmployeeController::class)->names('employee');
|
||||
});
|
31
Modules/Employee/routes/web.php
Normal file
31
Modules/Employee/routes/web.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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']);
|
||||
});
|
Reference in New Issue
Block a user