src/Settings/HomesteadSettings.php
public function configureSites($projectName, $projectDirectory)
    {
        $sites = [
            [
                'map' => "{$projectName}.test",
                'to' => "/home/vagrant/{$projectDirectory}/public",
            ],
        ];

        if (isset($this->attributes['sites']) && ! empty($this->attributes['sites'])) {
            foreach ($this->attributes['sites'] as $index => $user_site) {
                if (isset($user_site['map'])) {
                    $sites[$index]['map'] = $user_site['map'];
                }

                if (isset($user_site['to'])) {
                    $sites[$index]['to'] = $user_site['to'];
                }

                if (isset($user_site['type'])) {
                    $sites[$index]['type'] = $user_site['type'];
                }

                if (isset($user_site['schedule'])) {
                    $sites[$index]['schedule'] = $user_site['schedule'];
                }

                if (isset($user_site['php'])) {
                    $sites[$index]['php'] = $user_site['php'];
                }

                if (isset($user_site['xhgui'])) {
                    $sites[$index]['xhgui'] = $user_site['xhgui'];
                }
            }
        }

        $this->update(['sites' => $sites]);

        return $this;
    }
public function configureSites($projectName, $projectDirectory)
    {
        $sites = [
            [
                'map' => "{$projectName}.test",
                'to' => "/home/vagrant/{$projectDirectory}/public",
            ],
        ];

        if (isset($this->attributes['sites']) && ! empty($this->attributes['sites'])) {
            foreach ($this->attributes['sites'] as $index => $user_site) {
                if (isset($user_site['map'])) {
                    $sites[$index]['map'] = $user_site['map'];
                }

                if (isset($user_site['to'])) {
                    $sites[$index]['to'] = $user_site['to'];
                }

                if (isset($user_site['type'])) {
                    $sites[$index]['type'] = $user_site['type'];
                }

                if (isset($user_site['schedule'])) {
                    $sites[$index]['schedule'] = $user_site['schedule'];
                }

                if (isset($user_site['php'])) {
                    $sites[$index]['php'] = $user_site['php'];
                }

                if (isset($user_site['xhgui'])) {
                    $sites[$index]['xhgui'] = $user_site['xhgui'];
                }
            }
        }

        $this->update(['sites' => $sites]);

        return $this;
    }
public function configureSites ( $ projectName , $ projectDirectory ) { $ sites = [ [ 'map' => "{$projectName}.test" , 'to' => "/home/vagrant/{$projectDirectory}/public" , ] , ] ; if ( isset ( $ this -> attributes [ 'sites' ] ) && ! empty ( $ this -> attributes [ 'sites' ] ) ) { foreach ( $ this -> attributes [ 'sites' ] as $ index => $ user_site ) { if ( isset ( $ user_site [ 'map' ] ) ) { $ sites [ $ index ] [ 'map' ] = $ user_site [ 'map' ] ; } if ( isset ( $ user_site [ 'to' ] ) ) { $ sites [ $ index ] [ 'to' ] = $ user_site [ 'to' ] ; } if ( isset ( $ user_site [ 'type' ] ) ) { $ sites [ $ index ] [ 'type' ] = $ user_site [ 'type' ] ; } if ( isset ( $ user_site [ 'schedule' ] ) ) { $ sites [ $ index ] [ 'schedule' ] = $ user_site [ 'schedule' ] ; } if ( isset ( $ user_site [ 'php' ] ) ) { $ sites [ $ index ] [ 'php' ] = $ user_site [ 'php' ] ; } if ( isset ( $ user_site [ 'xhgui' ] ) ) { $ sites [ $ index ] [ 'xhgui' ] = $ user_site [ 'xhgui' ] ; } } } $ this -> update ( [ 'sites' => $ sites ] ) ; return $ this ; }
Configure the nginx sites.

@param  string  $projectName
@param  string  $projectDirectory
@return static
Configure the nginx sites .