]> _ Git - cubist_cms-back.git/commitdiff
wip #4216 @5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 May 2021 16:21:52 +0000 (18:21 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 May 2021 16:21:52 +0000 (18:21 +0200)
src/app/Magic/Fields/Color.php
src/app/Magic/Models/CubistMagicAbstractModel.php

index d2a7a9fdf3939af16917e641373e2fceace37c72..3d911e72d5379cb86f99897f0aeaf344e2f886c5 100644 (file)
@@ -11,6 +11,7 @@ class Color extends Field
     protected $_adminType = 'color';
     protected $_viewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::fields';
 
+    protected $_columnType = 'string';
     protected $_allowsAlpha = true;
 
     public function getDefaultAttributes()
index 982257a22cab9d9e30f7647f92493b1138743aa5..803a9da8895fab06357d58ffa8053bb248a2dbaa 100644 (file)
@@ -25,6 +25,7 @@ use Cubist\Util\Json;
 use Doctrine\DBAL\Schema\Schema;
 use Doctrine\DBAL\Schema\Table;
 use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Concerns\HasAttributes;
 use Illuminate\Database\Eloquent\Model;
 use Illuminate\Support\Carbon;
 use Illuminate\Support\Facades\Cache;
@@ -565,7 +566,8 @@ class CubistMagicAbstractModel extends Model implements HasMedia
         }
     }
 
-    public function onAfterSave(){
+    public function onAfterSave()
+    {
 
     }
 
@@ -833,5 +835,4 @@ class CubistMagicAbstractModel extends Model implements HasMedia
             $field->getFilterOptions();
         }
     }
-
 }