Create a key to authorize ssh using cd ~/Homestead && ssh-keygen -t rsa -b 4096
Hit Enter twice (you don’t have to enter a password)
Time to start up Vagrant using cd ~/Homestead && vagrant up and enter password when asked
Edit the Homestead.yaml file to configure locations of code using nano ~/.homestead/Homestead.yaml and make thefolder and sites sections look like this (refer below) ❗ Anytime you edit this Homestead.yaml file, you have to perform the next 3 steps in order for it to work, so let’s go ahead and do those now.
Stop vagrant temporarily by using vagrant halt
Reload yaml configurations by using vagrant reload --provision and enter password when asked
While still in ~/Homestead folder, use vagrant ssh to enter into your Vagrant setup
Enter into your Code folder you created earlier and then your ds-todos app using cd ~/Code/ds-todos
While you’re in your ds-todos folder, use composer install to install the necessary dependencies for the to-do app
Use php artisan migrate to migrate the app data over
Then use php artisan db:seed to seed the database
Finally, use php artisan key:generate to generate an app key for security purposes
At this point, you should be able to head over to //ds-todos.app in your browser and marvel at being able to set this all up! 🎉
Optional - Compiling SASS
If you want to compile SASS files, you will first have to install all npm dependencies using npm i. Then just perform a gulp watch and you’re good to go. Anytime you edit the SASS files, gulp will check it and compile it down to CSS.
❗ Since my ds-todos code is located in ~Dropbox/github/ds-todos, that’s where I map it to. However, you probably have it located elsewhere so make sure to get the right file path of that app using pwd in Terminal.folders: