src/Repositories/NodeFieldRepository.php
public function create($id, array $attributes)
    {
        $typeModelName = $this->getTypeModelName();

        $nodeType = $typeModelName::findOrFail($id);

        $nodeField = $nodeType->addField($attributes);

        $this->builderService->buildField(
            $nodeField->getName(),
            $nodeField->getType(),
            $nodeField->isIndexed(),
            $nodeType->getName(),
            $nodeType
        );

        return $nodeField;
    }
public function create($id, array $attributes)
    {
        $typeModelName = $this->getTypeModelName();

        $nodeType = $typeModelName::findOrFail($id);

        $nodeField = $nodeType->addField($attributes);

        $this->builderService->buildField(
            $nodeField->getName(),
            $nodeField->getType(),
            $nodeField->isIndexed(),
            $nodeType->getName(),
            $nodeType
        );

        return $nodeField;
    }
public function create ( $ id , array $ attributes ) { $ typeModelName = $ this -> getTypeModelName ( ) ; $ nodeType = $ typeModelName :: findOrFail ( $ id ) ; $ nodeField = $ nodeType -> addField ( $ attributes ) ; $ this -> builderService -> buildField ( $ nodeField -> getName ( ) , $ nodeField -> getType ( ) , $ nodeField -> isIndexed ( ) , $ nodeType -> getName ( ) , $ nodeType ) ; return $ nodeField ; }
Creates a node field

@param int $id
@param array $attributes
@return NodeFieldContract
Creates a node field