From 884eaeeb1a3308e5e627bd4e7e43e3c2dc7dc109 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Fri, 26 Aug 2016 13:37:21 +0200 Subject: [PATCH] Check if getCasts() exists Fixes #382 --- src/Console/ModelsCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index db08de5..e736b90 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -192,6 +192,9 @@ class ModelsCommand extends Command if ($hasDoctrine) { $this->getPropertiesFromTable($model); + } + + if (method_exists($model, 'getCasts')) { $this->castPropertiesType($model); }