Nwidart\Modules\Commands\InstallCommand::installFromFile PHP Méthode

installFromFile() protected méthode

Install modules from modules.json file.
protected installFromFile ( )
    protected function installFromFile()
    {
        if (!file_exists($path = base_path('modules.json'))) {
            $this->error("File 'modules.json' does not exist in your project root.");
            return;
        }
        $modules = Json::make($path);
        $dependencies = $modules->get('require', []);
        foreach ($dependencies as $module) {
            $module = collect($module);
            $this->install($module->get('name'), $module->get('version'), $module->get('type'));
        }
    }