diff --git a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php index d40ccb6..f5d367a 100644 --- a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php @@ -146,6 +146,9 @@ class ModelsCommand extends Command { $reflectionClass = new \ReflectionClass($name); if (!$reflectionClass->IsInstantiable()) { throw new \Exception($name . ' is not instanciable.'); + }elseif(!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model')){ + $this->comment("Class '$name' is not a model"); + continue; } $model = new $name();