public function destroy($id)
    {
        $modelName = $this->getModelName();

        $nodeField = $modelName::findOrFail($id);
        $nodeField->delete();

        $this->builderService->destroyField(
            $nodeField->getName(),
            $nodeField->nodeType->getName(),
            $nodeField->nodeType
        );

        return $nodeField;
    }
public function destroy($id)
    {
        $modelName = $this->getModelName();

        $nodeField = $modelName::findOrFail($id);
        $nodeField->delete();

        $this->builderService->destroyField(
            $nodeField->getName(),
            $nodeField->nodeType->getName(),
            $nodeField->nodeType
        );

        return $nodeField;
    }
public function destroy ( $ id ) { $ modelName = $ this -> getModelName ( ) ; $ nodeField = $ modelName :: findOrFail ( $ id ) ; $ nodeField -> delete ( ) ; $ this -> builderService -> destroyField ( $ nodeField -> getName ( ) , $ nodeField -> nodeType -> getName ( ) , $ nodeField -> nodeType ) ; return $ nodeField ; }
Destroys a node field

@param int $id
@return NodeFieldContract
Destroys a node field