Check if getCasts() exists

Fixes #382
This commit is contained in:
Barry vd. Heuvel
2016-08-26 13:37:21 +02:00
committed by GitHub
parent b6706683b2
commit 884eaeeb1a
+3
View File
@@ -192,6 +192,9 @@ class ModelsCommand extends Command
if ($hasDoctrine) { if ($hasDoctrine) {
$this->getPropertiesFromTable($model); $this->getPropertiesFromTable($model);
}
if (method_exists($model, 'getCasts')) {
$this->castPropertiesType($model); $this->castPropertiesType($model);
} }