0
votes

I have two roles , super Admin & Admin , the first has access to all modules , admin only to some pages. I want the user when clicking on role or permission menu to get error 403 access denied.

my route group Admin.php:

Route::group(['middleware' => ['role:Super Admin,access_backend']], function(){

CRUD::resource('role', 'Backpack\PermissionManager\app\Http\Controllers\RoleCrudController');     <-----  i tried this with no success.

I need to include the 2 routes from permission manager located in Backpack\PermissionManager\app\Http\Controllers\

thanks in advance!

1
copied role and permissioncrudController to Controller/Admin/, then changed namespace , it seems to work, but can't validate fields in PermissionCrudRequest copied to the Request folder, for example my permission name must be unique. - Rodrigo Cabrera
Create new Controller by extends from PermissionCrudController and override what you need - Soeurng Sar

1 Answers

0
votes

You need to add a \ in front of the namespace. Otherwise it will search for that class in your App namespace.

CRUD::resource('role', '\Backpack\PermissionManager\app\Http\Controllers\RoleCrudController');