改进optimize::schema指令

This commit is contained in:
thinkphp
2017-03-17 17:13:21 +08:00
parent fdde40adae
commit ade630d979

View File

@@ -42,7 +42,7 @@ class Schema extends Command
$list = scandir(APP_PATH . $module . DS . 'model');
$app = App::$namespace;
foreach ($list as $file) {
if ('.' == $file || '..' == $file) {
if (0 === strpos($file, '.')) {
continue;
}
$class = '\\' . $app . '\\' . $module . '\\model\\' . pathinfo($file, PATHINFO_FILENAME);
@@ -63,7 +63,7 @@ class Schema extends Command
$app = App::$namespace;
$list = scandir(APP_PATH . 'model');
foreach ($list as $file) {
if ('.' == $file || '..' == $file) {
if (0 === strpos($file, '.')) {
continue;
}
$class = '\\' . $app . '\\model\\' . pathinfo($file, PATHINFO_FILENAME);