@can and auth()->user()->can('permission name') not working #1955
Replies: 3 comments 1 reply
-
laravel-permission/tests/GateTest.php Lines 40 to 53 in 08cc9bd |
Beta Was this translation helpful? Give feedback.
-
I have migrated the permissions from another package to this package. So I have roles and their permissions. No direct permissions to the User. Looked at the code inside Inside When we call I am sure I am missing something. Just can't see it. Any thoughts on this @erikn69 ? |
Beta Was this translation helpful? Give feedback.
-
Never mind. There was a property on User model. Dang it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi guys,
@can directive and can() method not working permission via role,
user has role and role has permissions in my app and i want check permissions via roles not roles.
Does not check the direct permissions and permissions via role.
but $user->hasAnyPermmission() method is working good.
what i can do to fix it?!
Beta Was this translation helpful? Give feedback.
All reactions