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
I have a user, and assign a role
$user->assignRole('Admin')and in thins role, has many permissions assigned, with view_users for exampleIn this case, i have a user with permissions assigned by roles
On the view
@can('view_users')returns false, but the user has this permissionWhen i use
$user->permissionsreturns empty;When i use
$user->getAllPermissions()get my permissionsI'm doing anything wrong? How can i use the method @can for it?
Sorry for my bad english