/home/techb158/immovalet.com/platform/packages/dev-tool/src/Commands
NameSizeModeActions
Abstracts/-0755rm
Make/-0755rm
LocaleCreateCommand.php18970644editdlrm
LocaleRemoveCommand.php20640644editdlrm
PackageCreateCommand.php27030644editdlrm
PackageMakeCrudCommand.php42400644editdlrm
PackageRemoveCommand.php19260644editdlrm
RebuildPermissionsCommand.php27400644editdlrm
TestSendMailCommand.php7880644editdlrm
TruncateTablesCommand.php9660644editdlrm
Edit: /home/techb158/immovalet.com/platform/packages/dev-tool/src/Commands/PackageRemoveCommand.php (1926B)
argument('name'))) { $this->error('Only alphabetic characters are allowed.'); return 1; } $package = strtolower($this->argument('name')); $location = package_path($package); if (!File::isDirectory($location)) { $this->error('This package is not existed!'); return 1; } return $this->processRemove($package, $location); } /** * @param string $package * @param string $location * @return boolean * @throws Exception */ protected function processRemove(string $package, string $location): bool { $migrations = []; foreach (scan_folder($location . '/database/migrations') as $file) { $migrations[] = pathinfo($file, PATHINFO_FILENAME); } DB::table('migrations')->whereIn('migration', $migrations)->delete(); File::deleteDirectory($location); Helper::removeModuleFiles($package); $this->call('cache:clear'); $this->line('Removed package files successfully!'); $this->line('Remove "botble/' . $package . '": "*@dev" to composer.json then run composer update to remove this package!'); return 0; } }