protected function addPrimaryField(&$property, Field $field = null)
    {
        if (!is_null($field)) {
            $eloquentMethodName = $this->getPrimaryMethodName($field->getEloquentDataMethod());
            $property .= sprintf("%s('%s')", $this->getPropertyBase($eloquentMethodName), $field->name);
            $this->addFieldPropertyClousure($property);
        } else {
            $this->warn('Generating a migration without a primary key.');
        }

        return $this;
    }
protected function addPrimaryField(&$property, Field $field = null)
    {
        if (!is_null($field)) {
            $eloquentMethodName = $this->getPrimaryMethodName($field->getEloquentDataMethod());
            $property .= sprintf("%s('%s')", $this->getPropertyBase($eloquentMethodName), $field->name);
            $this->addFieldPropertyClousure($property);
        } else {
            $this->warn('Generating a migration without a primary key.');
        }

        return $this;
    }
protected function addPrimaryField ( & $ property , Field $ field = null ) { if ( ! is_null ( $ field ) ) { $ eloquentMethodName = $ this -> getPrimaryMethodName ( $ field -> getEloquentDataMethod ( ) ) ; $ property .= sprintf ( "%s('%s')" , $ this -> getPropertyBase ( $ eloquentMethodName ) , $ field -> name ) ; $ this -> addFieldPropertyClousure ( $ property ) ; } else { $ this -> warn ( 'Generating a migration without a primary key.' ) ; } return $ this ; }
Adds the table's "primary column" to the given property.

@param string $property
@param CrestApps\CodeGenerator\Models\Field $field

@return $this
Adds the table s primary column to the given property .