/** * Disable a module * * @param string $module * @param boolean $recollect (optional) * * @return boolean */ public function disable($module, $recollect = true) { $module = $this->toModuleId($module); if (!$this->canBeDisabled($module)) { return false; } $this->executeInstallerAction($module, 'disable'); $this->app->config()->write('modules.enabled.' . $module, false); $this->unregisterAssets($module); if ($recollect) { $this->app->recollect(); } $this->app->emit('module.disabled.' . $module); return true; }