Replies: 1 comment 1 reply
-
https://spatie.be/docs/laravel-permission/v5/basic-usage/middleware Route::group(['middleware' => ['role:super-admin|writer']], function () {
//
}); Only works for names, the reason is for let it be roles with numbers in name, example: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If i have
Code will not work as espected because of Spatie\Permission\Traits\HasRoles
So, in RoleMiddleware, $roles should be rewriten in order to get out with ids as int not as string.
Beta Was this translation helpful? Give feedback.
All reactions