mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user