src/Generator/Writer/Model/Steps/StubReplaceRelationData.php
protected function doesRelationNameConflict($name)
    {
        // relationships
        $relationships = array_merge(
            $this->data['relationships']['normal'],
            $this->data['relationships']['reverse'],
            $this->data['relationships']['image'],
            $this->data['relationships']['file'],
            $this->data['relationships']['checkbox']
        );

        if (array_key_exists($name, $relationships)) return true;

        // attributes
        $attributes = array_merge(
            $this->data->normal_attributes,
            $this->data->translated_attributes
        );

        if (in_array(snake_case($name), $attributes)) return true;

        return false;
    }
protected function doesRelationNameConflict($name)
    {
        // relationships
        $relationships = array_merge(
            $this->data['relationships']['normal'],
            $this->data['relationships']['reverse'],
            $this->data['relationships']['image'],
            $this->data['relationships']['file'],
            $this->data['relationships']['checkbox']
        );

        if (array_key_exists($name, $relationships)) return true;

        // attributes
        $attributes = array_merge(
            $this->data->normal_attributes,
            $this->data->translated_attributes
        );

        if (in_array(snake_case($name), $attributes)) return true;

        return false;
    }
protected function doesRelationNameConflict ( $ name ) { // relationships $ relationships = array_merge ( $ this -> data [ 'relationships' ] [ 'normal' ] , $ this -> data [ 'relationships' ] [ 'reverse' ] , $ this -> data [ 'relationships' ] [ 'image' ] , $ this -> data [ 'relationships' ] [ 'file' ] , $ this -> data [ 'relationships' ] [ 'checkbox' ] ) ; if ( array_key_exists ( $ name , $ relationships ) ) return true ; // attributes $ attributes = array_merge ( $ this -> data -> normal_attributes , $ this -> data -> translated_attributes ) ; if ( in_array ( snake_case ( $ name ) , $ attributes ) ) return true ; return false ; }
Returns whether a given name is already in use by anything that it would conflict with
for this model

@param string $name
@return bool
Returns whether a given name is already in use by anything that it would conflict with for this model