argument('module'); if (File::isDirectory(CatchAdmin::getModuleMigrationPath($module))) { foreach (File::files(CatchAdmin::getModuleMigrationPath($module)) as $file) { $path = Str::of(CatchAdmin::getModuleRelativePath(CatchAdmin::getModuleMigrationPath($module))) ->remove('.')->append($file->getFilename()); Artisan::call('migrate', [ '--path' => $path, '--force' => $this->option('force') ]); } $this->info("Module [$module] migrate success"); } else { $this->error('No migration files in module'); } } }