use CubistMagicAttribute;
protected $_attributes;
protected $_rules = [];
+ protected $_adminType = 'text';
+ protected $_databaseType = 'string';
/**
* @param $attributes
public function getDefaultAttributes()
{
- return ['type' => 'text', 'column' => false, 'form' => 'both', 'rules' => ''
- , 'fillable' => true, 'guarded' => false, 'hidden' => false];
+ return ['type' => $this->_adminType, 'column' => false, 'form' => 'both', 'rules' => '',
+ 'db_type' => $this->_databaseType,
+ 'fillable' => true, 'guarded' => false, 'hidden' => false];
}
public function __construct($attributes)