src/Commands/InstallCommand.php
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')
            );
        }
    }
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')
            );
        }
    }
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' ) ) ; } }
Install modules from modules.json file.
Install modules from modules . json file .