From 4f7aaa2e0171048f722fb6562ff1c9d116ac7fd4 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 29 Feb 2024 08:32:07 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20calling=20custom=20types?= =?UTF-8?q?=20(Fixes=20#217)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Builder.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Builder.php b/src/Builder.php index d5a81404..23f5ba9f 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -222,6 +222,12 @@ public function __call($method, $arguments) } } + if ($type = $this->getFieldType($method)) { + $name = array_shift($arguments); + + return $this->addField($name, $type, ...$arguments); + } + return parent::__call($method, $arguments); } }