public function revokeFromRole($permission, $role)
    {
        /** @var EloquentRole $roleModel */
        if ( ! ($roleModel = $this->sentinel->findRoleBySlug($role))) {
            return false;
        }

        $permissions = is_array($permission) ? $permission : [ $permission ];

        foreach ($permissions as $singlePermission) {
            $this->revokeSinglePermissionFromRole($singlePermission, $roleModel);
        }

        if ( ! $roleModel->save()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        $this->fireRoleChangeEvent();
        return true;
    }
public function revokeFromRole($permission, $role)
    {
        /** @var EloquentRole $roleModel */
        if ( ! ($roleModel = $this->sentinel->findRoleBySlug($role))) {
            return false;
        }

        $permissions = is_array($permission) ? $permission : [ $permission ];

        foreach ($permissions as $singlePermission) {
            $this->revokeSinglePermissionFromRole($singlePermission, $roleModel);
        }

        if ( ! $roleModel->save()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        $this->fireRoleChangeEvent();
        return true;
    }
public function revokeFromRole ( $ permission , $ role ) { /** @var EloquentRole $roleModel */ if ( ! ( $ roleModel = $ this -> sentinel -> findRoleBySlug ( $ role ) ) ) { return false ; } $ permissions = is_array ( $ permission ) ? $ permission : [ $ permission ] ; foreach ( $ permissions as $ singlePermission ) { $ this -> revokeSinglePermissionFromRole ( $ singlePermission , $ roleModel ) ; } if ( ! $ roleModel -> save ( ) ) { // @codeCoverageIgnoreStart return false ; // @codeCoverageIgnoreEnd } $ this -> fireRoleChangeEvent ( ) ; return true ; }
Revokes one or more permissions of a role.

@param string|string[] $permission
@param string          $role
@return bool
Revokes one or more permissions of a role .