mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Add support for model_locations
This commit is contained in:
@@ -167,11 +167,14 @@ class ModelsCommand extends Command {
|
|||||||
|
|
||||||
|
|
||||||
protected function loadModels(){
|
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();
|
$models = array();
|
||||||
if(file_exists($dir)){
|
foreach($dir as $d){
|
||||||
foreach(ClassMapGenerator::createMap($dir) as $model=> $path){
|
if(file_exists($d)){
|
||||||
$models[] = $model;
|
foreach(ClassMapGenerator::createMap($d) as $model=> $path){
|
||||||
|
$models[] = $model;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $models;
|
return $models;
|
||||||
|
|||||||
Reference in New Issue
Block a user