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

11 lines
449 B
PHP

<?php
use App\Http\Controllers\RolesController;
use Illuminate\Support\Facades\Route;
Route::prefix("roles")->group(function () {
Route::resource('/roles', RolesController::class);
Route::post('/roles/{role}/permissions', [RolesController::class, 'givePermission'])->name('roles.permissions');
Route::delete('/roles/{role}/permissions/{permission}', [RolesController::class, 'revokePermission'])->name('roles.permissions.revoke');
});