hasRole in Gate return false with middleware #2109
Unanswered
dmitrydrynov
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Try |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
hasRole('superadmin') in Gate return always false with middleware.
web.php
AuthServiceProvider.php
If I use
$user->hasRole('role_name')
in code orcan('some_permission')
in view I have a correct result.When I use this in route's middleware hasRole function return false always.
p.s. My superadmin role doesn't have any permissions only role.
Help please :)
Beta Was this translation helpful? Give feedback.
All reactions