Skip to content

Instantly share code, notes, and snippets.

@nimitbhargava
Last active May 13, 2020 12:15
Show Gist options
  • Save nimitbhargava/3ed9078de9f568dd9c9d749edc94357d to your computer and use it in GitHub Desktop.
Save nimitbhargava/3ed9078de9f568dd9c9d749edc94357d to your computer and use it in GitHub Desktop.
Laravel Homestead Setup

Setup

  1. Download Vagrant and then vagrant box add laravel/homestead. Please use 3) virtualbox option if asked.
  2. cd ~; git clone https://github.com/laravel/homestead.git ~/Homestead
  3. cd ~/Homestead
  4. bash init.sh (create the Homestead.yaml configuration file and will be placed in the Homestead directory)
  5. vi Homestead.yaml Modify this
- map: theyyam.test
to: /home/vagrant/code/theyyam/public

Note: Please use spaces in tab for editing YAML
6. mkdir ~/code
7. vagrant up
8. vagrant reload --provision (this is required whenever we change Homested.yaml)
10. cd ~/code; git clone <your-repo-link>; cd ~/Homestead
11. SSH into Homestead Vagrant Box vagrant ssh 12. Run the application

cd code/<your-project-name>
php artisan serve
  1. control+d (come out of the vagrant box)
  2. Adding virtual host at your machine sudo vi /etc/hosts Add
192.168.10.10 <project-name>.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment