diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 7ebe99c..9e4bd48 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -264,9 +264,12 @@ class ModelsCommand extends Command $models = array(); foreach ($this->dirs as $dir) { $dir = base_path() . '/' . $dir; - if (file_exists($dir)) { - foreach (ClassMapGenerator::createMap($dir) as $model => $path) { - $models[] = $model; + $dirs = glob($dir, GLOB_ONLYDIR); + foreach ($dirs as $dir) { + if (file_exists($dir)) { + foreach (ClassMapGenerator::createMap($dir) as $model => $path) { + $models[] = $model; + } } } }