From: Vincent Vanwaelscappel Date: Fri, 24 May 2019 15:43:33 +0000 (+0200) Subject: #2783 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d38a27eeadfd2a6cd6ddaf8ae2411779b126a758;p=cubist_cms-back.git #2783 --- diff --git a/src/app/Magic/Models/CubistMagicModelAbstract.php b/src/app/Magic/Models/CubistMagicModelAbstract.php index 717d92d..1642fd0 100644 --- a/src/app/Magic/Models/CubistMagicModelAbstract.php +++ b/src/app/Magic/Models/CubistMagicModelAbstract.php @@ -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)