public function moduleConfig($modules)
    {
        if (is_string($modules)) {
            $config = config('society.'.strtolower($modules).'.settings');

            return $config;
        }

        $config = [];
        foreach ($modules as $module) {
            if ($moduleSettings = config('society.'.strtolower($module->getName()).'.settings')) {
                $config[$module->getName()] = $moduleSettings;
            }
        }

        return $config;
    }
public function moduleConfig($modules)
    {
        if (is_string($modules)) {
            $config = config('society.'.strtolower($modules).'.settings');

            return $config;
        }

        $config = [];
        foreach ($modules as $module) {
            if ($moduleSettings = config('society.'.strtolower($module->getName()).'.settings')) {
                $config[$module->getName()] = $moduleSettings;
            }
        }

        return $config;
    }
public function moduleConfig ( $ modules ) { if ( is_string ( $ modules ) ) { $ config = config ( 'society.' . strtolower ( $ modules ) . '.settings' ) ; return $ config ; } $ config = [ ] ; foreach ( $ modules as $ module ) { if ( $ moduleSettings = config ( 'society.' . strtolower ( $ module -> getName ( ) ) . '.settings' ) ) { $ config [ $ module -> getName ( ) ] = $ moduleSettings ; } } return $ config ; }
Return all modules that have settings
with its settings.

@param array|string $modules

@return array
Return all modules that have settings with its settings .