Http/Controllers/backend/ModulesController.php
public function disable(Module $module)
    {
        if ($this->moduleManager->isCoreModule($module)) {
            return redirect()->route('backend::modules.modules.show', [$module->getLowerName()])
                ->with('error', trans('workshop::modules.module cannot be disabled'));
        }

        $module->disable();
    }
public function disable(Module $module)
    {
        if ($this->moduleManager->isCoreModule($module)) {
            return redirect()->route('backend::modules.modules.show', [$module->getLowerName()])
                ->with('error', trans('workshop::modules.module cannot be disabled'));
        }

        $module->disable();
    }
public function disable ( Module $ module ) { if ( $ this -> moduleManager -> isCoreModule ( $ module ) ) { return redirect ( ) -> route ( 'backend::modules.modules.show' , [ $ module -> getLowerName ( ) ] ) -> with ( 'error' , trans ( 'workshop::modules.module cannot be disabled' ) ) ; } $ module -> disable ( ) ; }
Disable the given module.

@param Module $module

@return mixed
Disable the given module .