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;
}
}
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