From: Vincent Vanwaelscappel Date: Fri, 24 May 2019 14:37:01 +0000 (+0200) Subject: #2783 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=656908a36eb6165fe2390786f917bf620dec30ae;p=cubist_cms-back.git #2783 --- diff --git a/src/app/Magic/Fields/Field.php b/src/app/Magic/Fields/Field.php index c8d0052..e362e13 100644 --- a/src/app/Magic/Fields/Field.php +++ b/src/app/Magic/Fields/Field.php @@ -11,6 +11,8 @@ class Field use CubistMagicAttribute; protected $_attributes; protected $_rules = []; + protected $_adminType = 'text'; + protected $_databaseType = 'string'; /** * @param $attributes @@ -36,8 +38,9 @@ class Field 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)