1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 20:54:03 +00:00

Automatically scan subdirectories in getModels()

This commit is contained in:
lukinovec 2023-06-15 10:20:18 +02:00
parent 37b36430e5
commit 6b19a26d2c

View file

@ -22,7 +22,7 @@ trait DealsWithModels
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) {
$fileContents = str($file->getContents());