vagrant box add laravel/homestead
In a shell, check that you have SSH.
cd ~ ls -la # check for .ssh
If not, you can generate a key.
ssh-keygen -t rsa -C "email@example.com".
There is also a great guide on GitHub.
Init the Homestead.yaml file
In ~/Homestead, alter the Homestead.yaml file.
Sites we can change to anything. Eg. laravel.dev
Ensure sites is okay too and that the Sites/
<here> is laravel-basics/public
Run the Vagrant Up command in terminal
If there is a host issue, change the Homestead.yaml host.
Getting into the box
Connect via SSH
Ensure composer is installed on your external SSH OS.
composer global require "laravel/installer"
composer create-project --prefer-dist laravel/laravel laravel-basics
laravel new laravel-basics
Note laravel-basics can be swapped for anything.
Run pwd and check this against what you have in ~/.homestead/Homestead.yaml
Then jump to the site (127.0.0.1:8000) to see if it is running successfully.
To get rid of the 127.0.0.1, we can change it to another host.
cd /etc from the Homestead file and adjust the hosts file in a text editor to make the website easier to navigate to.