]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 May 2019 14:37:01 +0000 (16:37 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 May 2019 14:37:01 +0000 (16:37 +0200)
src/app/Magic/Fields/Field.php

index c8d005286c4bdcfa27e094da863c076df57ac0f0..e362e13b82d14f00de171dfc91a691c53b212c65 100644 (file)
@@ -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)