src/Settings/HomesteadSettings.php
public function configureSharedFolders($projectPath, $projectDirectory)
    {
        $folders = [
            [
                'map' => $projectPath,
                'to' => "/home/vagrant/{$projectDirectory}",
            ],
        ];

        if (isset($this->attributes['folders']) && ! empty($this->attributes['folders'])) {
            foreach ($this->attributes['folders'] as $index => $user_folder) {
                if (isset($user_folder['map']) && empty($folders[$index]['map'])) {
                    $folders[$index]['map'] = dirname($projectPath).'/'.basename($user_folder['map']);
                }

                if (isset($user_folder['to'])) {
                    $folders[$index]['to'] = $user_folder['to'];
                }

                if (isset($user_folder['type'])) {
                    $folders[$index]['type'] = $user_folder['type'];
                }
            }
        }

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

        return $this;
    }
public function configureSharedFolders($projectPath, $projectDirectory)
    {
        $folders = [
            [
                'map' => $projectPath,
                'to' => "/home/vagrant/{$projectDirectory}",
            ],
        ];

        if (isset($this->attributes['folders']) && ! empty($this->attributes['folders'])) {
            foreach ($this->attributes['folders'] as $index => $user_folder) {
                if (isset($user_folder['map']) && empty($folders[$index]['map'])) {
                    $folders[$index]['map'] = dirname($projectPath).'/'.basename($user_folder['map']);
                }

                if (isset($user_folder['to'])) {
                    $folders[$index]['to'] = $user_folder['to'];
                }

                if (isset($user_folder['type'])) {
                    $folders[$index]['type'] = $user_folder['type'];
                }
            }
        }

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

        return $this;
    }
public function configureSharedFolders ( $ projectPath , $ projectDirectory ) { $ folders = [ [ 'map' => $ projectPath , 'to' => "/home/vagrant/{$projectDirectory}" , ] , ] ; if ( isset ( $ this -> attributes [ 'folders' ] ) && ! empty ( $ this -> attributes [ 'folders' ] ) ) { foreach ( $ this -> attributes [ 'folders' ] as $ index => $ user_folder ) { if ( isset ( $ user_folder [ 'map' ] ) && empty ( $ folders [ $ index ] [ 'map' ] ) ) { $ folders [ $ index ] [ 'map' ] = dirname ( $ projectPath ) . '/' . basename ( $ user_folder [ 'map' ] ) ; } if ( isset ( $ user_folder [ 'to' ] ) ) { $ folders [ $ index ] [ 'to' ] = $ user_folder [ 'to' ] ; } if ( isset ( $ user_folder [ 'type' ] ) ) { $ folders [ $ index ] [ 'type' ] = $ user_folder [ 'type' ] ; } } } $ this -> update ( [ 'folders' => $ folders ] ) ; return $ this ; }
Configure the shared folders.

@param  string  $projectPath
@param  string  $projectDirectory
@return static
Configure the shared folders .