From 57dc033061fa04e582310169ac2b8813c1f6161b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Monterisi?= Date: Sat, 6 Dec 2014 23:04:58 +0100 Subject: [PATCH] Model doc : create model using App::make($name) trying to generate doc for a model with dependencies in constructor will fail with `new $name` . Now it works using App:make($name). Laravel IOC resolves the dependencies. --- src/Console/ModelsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 5ec6fdb..d8efc3d 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -168,7 +168,7 @@ class ModelsCommand extends Command throw new \Exception($name . ' is not instanciable.'); } - $model = new $name(); + $model = \App::make($name); if ($hasDoctrine) { $this->getPropertiesFromTable($model); }