Configuring Shared Folders
Last updated
Last updated
Steps to Configuring Shared Folders in Laravel Homestead:
Run init.bat
command from the Homestead directory to create the Homestead.yaml configuration file.
Run code .
command from the Homestead directory to open the repository in VS Code.
Select Homestead.yaml file to display configuration.
Update the folders:
configuration with the below configuration:
Create a directory/folder mapping to share your Laravel project/code between your host and Homestead guest machine. In this example, I mapped the C:\code
folder to the /home/vagrant/code
folder in the Homestead virtual machine.
Update the sites:
configuration, by adding your project name.
Your Homestead.yaml configuration will look like this:
Save the changes to the Homestead.yaml
file and exit.
You need to install the vagrant-winnfsd plugin for type
:
"nfs"
configuration by running the following command in your terminal:
This required restarting the computer after the installation.
That's it! You have successfully configured shared folders in Laravel Homestead on a Windows machine.
In the next topic, we will generate SSH Keys. SSH keys are a pair of cryptographic keys (a public key and a private key) that can be used to authenticate with remote servers or services, without the need for a password.
In this example, we named the project mylaravelapp which will be discussed in detail in
init.bat
command from the Homestead directory.