public function addField($type, $name, array $attributes = []) { $attributes = array_merge(compact('type', 'name'), $attributes); $this->fields[] = $field = new Fluent($attributes); return $field; }