Removes RootSkills from Kstruktur

@param mixed $id
@param mixed $data
@return PayloadInterface
424563
public function removeRootSkills($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Kstruktur not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveRootSkills($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(KstrukturEvent::PRE_ROOT_SKILLS_REMOVE, $model, $data);
		$this->dispatch(KstrukturEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(KstrukturEvent::POST_ROOT_SKILLS_REMOVE, $model, $data);
		$this->dispatch(KstrukturEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
63367
public function update($id, $data)
    {
        $response = $this->handler->handle('PUT', $data);

        return $this->make($response, false);
    }
799304
public function destroyUpdate($id)
    {
        return $this->send($this->getHttp()->post($this->url.'updates/'.$id.'/destroy.json'));
    }
103979
public function removeFieldById($id)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getId() == $id) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
1179786
public function destroy($id)
    {
        $this->user->delete($id);

        flash(trans('core::messages.resource.resource deleted', ['name' => trans('user::users.title.user')]));

        return redirect()->route('backend::user.user.index');
    }
21854
public function destroy($id)
    {
        $this->entriesRepository->delete($id, $this->resource);

        return response()->json(['status' => 'ok']);
    }
1360034
public function destroy($id, $translationId)
    {
        $file = $this->getFile($id);
        if (!empty($file)) {
            $this->authorize('delete', $file);
            $translation = $this->repository->getTranslationById($file, $translationId);
            if (!empty($translation)) {
                $this->repository->deleteTranslation($translation);
                return $this->respondWithSimpleSuccess(['success' => true]);
            }
        }
        return $this->respondNotFound();
    }
743033
public function destroy($id)
    {
    	$role = Role::findOrFail($id);
		$role->delete();
		
		return redirect(url("role"))->with('dp_announce', trans('deeppermission.alert.role.deleted'));
    }
701343
public function removeFunctionPhases($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass remove to internal logic
		try {
			$this->doRemoveFunctionPhases($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_FUNCTION_PHASES_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_FUNCTION_PHASES_REMOVE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
528840
public function close(string $id, array $data, array $headers = [])
    {
        $url = $this->url('invoices/%s/close', $id);

        return $this->post($url, $data);
    }
138150
public function updateLineages($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass update to internal logic
		try {
			$this->doUpdateLineages($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_LINEAGES_UPDATE, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_LINEAGES_UPDATE, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
906103
public function forget($id)
    {
        return $this->resolver->createCommand()->delete($this->table, ['id' => $id])->execute();
    }
808467
public function destroy($id)
    {
        try {
            $this->contentTypes->destroy($id);
        } catch (Exception $e) {
            return $this->handleException($e, trans('soda::errors.delete', ['object' => trans('soda::terminology.content_type')]));
        }

        return redirect()->route('soda.content-types.index')->with('warning', trans('soda::messages.deleted', ['object' => trans('soda::terminology.content_type')]));
    }
538189
public function destroy($id)
    {
        try {
            $this->content->destroy($id);
        } catch (Exception $e) {
            return $this->handleException($e, trans('soda::errors.delete', ['object' => trans('soda::terminology.content')]));
        }

        return redirect()->back()->with('info', trans('soda::messages.deleted', ['object' => trans('soda::terminology.content')]));
    }
1266853
public function destroy($id)
    {
        $user = \App\User::findOrfail($id);

        $user->delete();

        return redirect('scaffold-users');
    }
1166631
public function removeBlockAction($id)
    {
        /** @var BlockManager $manager */
        $manager  = $this->get('opifer.content.block_manager');
        $response = new JsonResponse;

        try {
            $block = $manager->find($id, true);
            $manager->remove($block, true);
            $response->setData(['state' => 'removed']);
        } catch (\Exception $e) {
            $response->setStatusCode(500);
            $response->setData(['error' => $e->getMessage()]);
        }

        return $response;
    }
582836
public function addRootSkills($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Kstruktur not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddRootSkills($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(KstrukturEvent::PRE_ROOT_SKILLS_ADD, $model, $data);
		$this->dispatch(KstrukturEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(KstrukturEvent::POST_ROOT_SKILLS_ADD, $model, $data);
		$this->dispatch(KstrukturEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}