public function detachPermissions(array $ids, $reload = true)
    {
        event(new DetachingPermissionsFromGroup($this, $ids));
        $detached = $this->permissions()->whereIn('id', $ids)->update(['group_id' => 0]);
        event(new DetachedPermissionsFromGroup($this, $ids, $detached));

        $this->loadPermissions($reload);

        return $detached;
    }