From: Vincent Vanwaelscappel Date: Wed, 12 Jun 2019 14:47:29 +0000 (+0200) Subject: #2810 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=720f18faced61c6ff706c11059c2db3c3b0657cf;p=cubist_cms-back.git #2810 --- diff --git a/src/app/Magic/Fields/Model.php b/src/app/Magic/Fields/Model.php index 33cef15..2b231b4 100644 --- a/src/app/Magic/Fields/Model.php +++ b/src/app/Magic/Fields/Model.php @@ -31,4 +31,12 @@ class Model extends Field return $modelClass::all()->pluck($this->getAttribute('attribute'), $inst->getPrimaryKey())->toArray(); } + + public function getDatabaseType() + { + if ($this->getAttribute('allows_multiple')) { + return 'text'; + } + return parent::getDatabaseType(); + } }