src/Node.php
public function setNodeTypeByKey($id)
    {
        $nodeType = NodeType::findOrFail($id);

        $this->nodeType()->associate($nodeType);

        $this->mailing = $nodeType->isTypeMailing();
    }
public function setNodeTypeByKey($id)
    {
        $nodeType = NodeType::findOrFail($id);

        $this->nodeType()->associate($nodeType);

        $this->mailing = $nodeType->isTypeMailing();
    }
public function setNodeTypeByKey ( $ id ) { $ nodeType = NodeType :: findOrFail ( $ id ) ; $ this -> nodeType ( ) -> associate ( $ nodeType ) ; $ this -> mailing = $ nodeType -> isTypeMailing ( ) ; }
Sets the node type by key and validates it

@param int $id
@return NodeType
Sets the node type by key and validates it