Working proposal apply code, fixed schema (need reset - artisan migrate:fresh)

This commit is contained in:
2018-08-11 18:42:12 +02:00
parent 8efc31d820
commit f2910f977f
12 changed files with 168 additions and 69 deletions
+20 -11
View File
@@ -154,18 +154,27 @@ class Column implements JsonSerializable, Arrayable
/**
* @return array with keys {name, title, type}
*/
public function toArray()
public function toArray($decorate=true)
{
return [
'id' => $this->id,
'name' => $this->name,
'title' => $this->title,
'type' => $this->type,
'_new' => $this->isNew,
'_remove' => $this->toRemove,
'_changed' => $this->modified_attribs,
'_orig' => $this->orig_attribs,
];
if ($decorate) {
return [
'id' => $this->id,
'name' => $this->name,
'title' => $this->title,
'type' => $this->type,
'_new' => $this->isNew,
'_remove' => $this->toRemove,
'_changed' => $this->modified_attribs,
'_orig' => $this->orig_attribs,
];
} else {
return [
'id' => $this->id,
'name' => $this->name,
'title' => $this->title,
'type' => $this->type,
];
}
}
/**