'fillable' => true, 'guarded' => false, 'hidden' => false, 'translatable' => $this->_translatable,
'column_type' => $this->_columnType, 'default' => '', 'cast' => $this->_cast,
'allow_null' => true,
- 'fake' => false, 'store_in' => false];
+ 'fake' => false, 'store_in' => false, 'attributes' => []];
}
public function __construct($attributes)
if ($this->getAttribute('fake', false) === true) {
$this->setAttributeIfNotSet('store_in', 'extras');
}
+ if ($this->hasAttribute('when')) {
+ $htmlAttributes = $this->getAttribute('attributes', []);
+ $htmlAttributes['data-when'] = json_encode($this->getAttribute('when'));
+ $this->setAttribute('attributes', $htmlAttributes);
+ }
}
}
--- /dev/null
+<?php
+
+
+namespace Cubist\Backpack\app\Magic\Fields;
+
+
+
+class Range extends Field
+{
+ protected $_adminType = 'range';
+}