/home/techb158/immovalet.com/vendor/botble/dev-tool/src/Commands
Edit: /home/techb158/immovalet.com/vendor/botble/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;
}
}