mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
Add support for model_locations
This commit is contained in:
@@ -167,11 +167,14 @@ class ModelsCommand extends Command {
|
||||
|
||||
|
||||
protected function loadModels(){
|
||||
$dir = base_path().'/'.$this->dir;
|
||||
$default = (array)(base_path().'/'.$this->dir);
|
||||
$dir = array_merge(\Config::get('laravel-ide-helper::model_locations'),$default);
|
||||
$models = array();
|
||||
if(file_exists($dir)){
|
||||
foreach(ClassMapGenerator::createMap($dir) as $model=> $path){
|
||||
$models[] = $model;
|
||||
foreach($dir as $d){
|
||||
if(file_exists($d)){
|
||||
foreach(ClassMapGenerator::createMap($d) as $model=> $path){
|
||||
$models[] = $model;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $models;
|
||||
|
||||
Reference in New Issue
Block a user