defender icon indicating copy to clipboard operation
defender copied to clipboard

$user->permissions

Open jammersonf opened this issue 7 years ago • 0 comments

I have a user, and assign a role $user->assignRole('Admin') and in thins role, has many permissions assigned, with view_users for example

In this case, i have a user with permissions assigned by roles

On the view @can('view_users') returns false, but the user has this permission

When i use $user->permissions returns empty; When i use $user->getAllPermissions() get my permissions

I'm doing anything wrong? How can i use the method @can for it?

Sorry for my bad english

jammersonf avatar Aug 09 '18 20:08 jammersonf