]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 May 2019 15:43:33 +0000 (17:43 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 May 2019 15:43:33 +0000 (17:43 +0200)
src/app/Magic/Models/CubistMagicModelAbstract.php

index 717d92d492b3c7573362a5c9d8120a289893a5f2..1642fd049908773b8d3edfc434f828accc0861a1 100644 (file)
@@ -32,16 +32,11 @@ class CubistMagicModelAbstract extends Model
 
     public function __construct(array $attributes = [])
     {
-        $this->__attributes = $attributes;
-        $this->init();
-    }
-
-    protected function init()
-    {
+        $this->setFields();
         $this->bootIfNotBooted();
         $this->initializeTraits();
         $this->syncOriginal();
-        $this->fill($this->__attributes);
+        $this->fill($attributes);
     }
 
     public function getOption($key, $default = null)