I have a problem that I have not been able to solve and it has been several hours in the. I am using Laravel 5.2 and the component to manage Roles and Permissions Entrust . Everything is well configured, including the middleware provided by Entrust
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
Now, I'm trying to configure my routes and I do it this way:
Route::group(['middleware' => ['role:admin']], function() {
//MIS RUTAS
});
Up there all right, when I enter with admin I have access to everything and when I enter the BASIC ROLE I am limited, until there is still good, but there is a "SPECIAL" profile that has access to everything, except a route, Then I do the following:
Route::group(['middleware' => ['role:admin|especial']], function() {
//MIS RUTAS
});
When I do this, when I log in with a role user "admin" everything works fine, but when I enter a role with a "special" role, it does not detect it, that is, it returns the error message that I configured to have the access prohibited to the link.