I am using backpack for laravel V4, Laravel 6, I defined roles and permissions and assigned file-manager
permission and manager
role to a user. When I try to use it in route middleware I get Forbidden Error 403, what I tried:
in routes/backpack/custom.php
'middleware' => ['web', config('backpack.base.middleware_key', 'admin'), 'can:file-manager']
when I use as instructed in spatie/laravel-permission
documentation :
Route::group(['middleware' => ['role:manager']], function () {
//
});
I receive Target class [role] does not exist
error.
I searched different places but no luck, please advise the right way to use permission manager in routes.