src/Commands/InstallCommand.php
protected function installFromFile()
    {
        if (!file_exists($path = base_path('components.json'))) {
            $this->error("File 'components.json' does not exist in your project root.");

            return;
        }

        $components = Json::make($path);

        $dependencies = $components->get('require', []);

        foreach ($dependencies as $component) {
            $component = collect($component);

            $this->install(
                $component->get('name'),
                $component->get('version'),
                $component->get('type')
            );
        }
    }
protected function installFromFile()
    {
        if (!file_exists($path = base_path('components.json'))) {
            $this->error("File 'components.json' does not exist in your project root.");

            return;
        }

        $components = Json::make($path);

        $dependencies = $components->get('require', []);

        foreach ($dependencies as $component) {
            $component = collect($component);

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