src/MakeCommand.php
protected function createSettingsFile($format, $options)
    {
        $SettingsClass = ($format === 'json') ? JsonSettings::class : YamlSettings::class;

        $filename = $this->exampleSettingsExists($format) ?
            "{$this->basePath}/Homestead.{$format}.example" :
            __DIR__."/../resources/Homestead.{$format}";

        $settings = $SettingsClass::fromFile($filename);

        if (! $this->exampleSettingsExists($format)) {
            $settings->updateName($options['name'])
                ->updateHostname($options['hostname']);
        }

        $settings->updateIpAddress($options['ip'])
            ->configureSites($this->projectName, $this->defaultProjectName)
            ->configureSharedFolders($this->basePath, $this->defaultProjectName)
            ->save("{$this->basePath}/Homestead.{$format}");
    }
protected function createSettingsFile($format, $options)
    {
        $SettingsClass = ($format === 'json') ? JsonSettings::class : YamlSettings::class;

        $filename = $this->exampleSettingsExists($format) ?
            "{$this->basePath}/Homestead.{$format}.example" :
            __DIR__."/../resources/Homestead.{$format}";

        $settings = $SettingsClass::fromFile($filename);

        if (! $this->exampleSettingsExists($format)) {
            $settings->updateName($options['name'])
                ->updateHostname($options['hostname']);
        }

        $settings->updateIpAddress($options['ip'])
            ->configureSites($this->projectName, $this->defaultProjectName)
            ->configureSharedFolders($this->basePath, $this->defaultProjectName)
            ->save("{$this->basePath}/Homestead.{$format}");
    }
protected function createSettingsFile ( $ format , $ options ) { $ SettingsClass = ( $ format === 'json' ) ? JsonSettings :: class : YamlSettings :: class ; $ filename = $ this -> exampleSettingsExists ( $ format ) ? "{$this->basePath}/Homestead.{$format}.example" : __DIR__ . "/../resources/Homestead.{$format}" ; $ settings = $ SettingsClass :: fromFile ( $ filename ) ; if ( ! $ this -> exampleSettingsExists ( $ format ) ) { $ settings -> updateName ( $ options [ 'name' ] ) -> updateHostname ( $ options [ 'hostname' ] ) ; } $ settings -> updateIpAddress ( $ options [ 'ip' ] ) -> configureSites ( $ this -> projectName , $ this -> defaultProjectName ) -> configureSharedFolders ( $ this -> basePath , $ this -> defaultProjectName ) -> save ( "{$this->basePath}/Homestead.{$format}" ) ; }
Create the homestead settings file.

@param  string  $format
@param  array  $options
@return void
Create the homestead settings file .