/** * Handle the command. * * @param Kernel $console * @param Dispatcher $events */ public function handle(Kernel $console, Dispatcher $events, ModuleRepositoryInterface $modules) { $this->module->fire('uninstalling'); $options = ['--addon' => $this->module->getNamespace()]; $console->call('migrate:reset', $options); $console->call('streams:destroy', ['namespace' => $this->module->getSlug()]); $console->call('streams:cleanup'); $modules->uninstall($this->module); $this->module->fire('uninstalled'); $events->fire(new ModuleWasUninstalled($this->module)); }
/** * Return the module name. * * @param Module $module * @return string */ public function parse(Module $module) { return studly_case($module->getSlug()); }
/** * Get the URL. * * @param Module $module * @return string */ protected function getUrl(Module $module) { return url('admin/' . $module->getSlug()); }