}
if ($this->getAttribute('allows_multiple')) {
- $this->setAttribute('cast', 'json');
+ $this->setAttribute('cast', 'array');
}
parent::_postSetAttributes();
}
+
+ public function getColumnData()
+ {
+ $res = parent::getColumnData();
+ $res['options'] = $this->getAttribute('options');
+ return $res;
+ }
}
$this->translatable[] = $name;
}
if ($field->getAttribute('cast', false) !== false) {
- $this->casts[$field->getAttribute('name')] = $field->getAttribute('name');
+ $this->casts[$field->getAttribute('name')] = $field->getAttribute('cast');
}
}
+
+
}
/**