mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
Ability to use patterns for model_locations (#921)
Example: app/Services/*/Models
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user