From 720f18faced61c6ff706c11059c2db3c3b0657cf Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 12 Jun 2019 16:47:29 +0200 Subject: [PATCH] #2810 --- src/app/Magic/Fields/Model.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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(); + } } -- 2.39.5