Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Conversation

@Ricky-rick
Copy link

Call the 'canOne' function instead of the 'can' function in the Middleware and ServiceProvider so we can make us of Laravel's authorization 'can' function.
Now it's posible to use the Authorizable and the HasRoleAndPermission trait in the user model

class User extends Model implements AuthenticatableContract, HasRoleAndPermissionContract
{
    use Authenticatable, HasRoleAndPermission, Authorizable {
        Authorizable::can insteadof HasRoleAndPermission;
        HasRoleAndPermission::can as hasRoleAndPermissionCan;
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant