mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 04:34:03 +00:00
Automatically scan subdirectories in getModels()
This commit is contained in:
parent
37b36430e5
commit
6b19a26d2c
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ trait DealsWithModels
|
||||||
return (static::$modelDiscoveryOverride)();
|
return (static::$modelDiscoveryOverride)();
|
||||||
}
|
}
|
||||||
|
|
||||||
$modelFiles = Finder::create()->files()->name('*.php')->in(static::$modelDirectories)->depth('== 0');
|
$modelFiles = Finder::create()->files()->name('*.php')->in(static::$modelDirectories);
|
||||||
|
|
||||||
$classes = collect($modelFiles)->map(function (SplFileInfo $file) {
|
$classes = collect($modelFiles)->map(function (SplFileInfo $file) {
|
||||||
$fileContents = str($file->getContents());
|
$fileContents = str($file->getContents());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue