master_template/routes/route.users.php
2024-06-20 16:42:33 +05:45

14 lines
1.0 KiB
PHP

<?php
use App\Http\Controllers\UsersController;
use Illuminate\Support\Facades\Route;
Route::prefix("users")->group(function () {
Route::get('/', [UsersController::class, 'index'])->name('users.index');
Route::get('/create', [UsersController::class, 'create'])->name('users.create');
Route::post('/store', [UsersController::class, 'store'])->name('users.store');
Route::get('/show/{id}', [UsersController::class, 'show'])->name('users.show');
Route::get('/edit/{id}', [UsersController::class, 'edit'])->name('users.edit') ;
Route::post('/update/{user}', [UsersController::class, 'update'])->name('users.update');
Route::delete('/destroy/{id}', [UsersController::class, 'destroy'])->name('users.destroy');
Route::delete('/users/{user}/roles/{role}', [UsersController::class, 'removeRole'])->name('users.roles.remove');
Route::delete('/users/{user}/permissions/{permission}', [UsersController::class, 'revokePermission'])->name('users.permissions.revoke');
});