$this->translatable[] = $store_in;
}
$this->fakeColumns[] = $store_in;
- $field->setAttribute('translatable', false);
} else {
if ($field->getAttribute('fillable')) {
$this->fillable[] = $name;
if ($field->getAttribute('cast', false) !== false) {
$this->casts[$field->getAttribute('name')] = $field->getAttribute('cast');
}
- if ($field->getAttribute('set_before_operation', false) !== false) {
- $this->varSetBeforeOperations[] = $field->getAttribute('name');
+ if ($field->getAttribute('translatable')) {
+ $this->translatable[] = $name;
}
}
- if ($field->getAttribute('translatable')) {
- $this->translatable[] = $name;
- }
-
return $field;
}
'EXTENDS' => $this->_getBaseController(),
'CLONABLE' => $this->clonable ? 'true' : 'false',
'BULK' => $this->getOption('bulk', true) ? 'true' : 'false',
- 'VARSETBEFOREOPERATION' => var_export($this->varSetBeforeOperations, true),
];
$res = file_get_contents($stub);
$table->setPrimaryKey([$this->primaryKey], 'pk_' . $this->table);
-
foreach ($this->_relationships as $relationship) {
if ($relationship->getRelationship() == 'belongsToMany') {
$field->defineDbColumn($table);
}
- $this->fakeColumns=array_unique($this->fakeColumns);
+ $this->fakeColumns = array_unique($this->fakeColumns);
foreach ($this->fakeColumns as $fakeColumn) {
$table->addColumn($fakeColumn, 'text');
}
public function getIdValue()
{
- return $this->{$this->getPrimaryKey()};
+ return $this->getKey();
}