Setting up homestead
homestead is a virtual machine. A virtual environment suited for
It has everything installed on it that needs to be installed for a
laravel application and is a reusable, idempotent environment.
Require Homestead from
composed global require "laravel/homestead=~2.0"
- Add the vagrant box
vagrant box add laravel/homestead
This does all the tricky stuff like stting up shared folders, SSH keys and the like.
This process creates a file called
~/.homestead/homestead.yml which defines your setup.
Set your local dev folder in
You can now visit your site at localhost:8000
- Setup your local host file
sudo vim /etc/hosts
Change to the following:
- If you change settings or add multiple sites I think you will need to destory and restart the whole thing:
SSH into the Box
You might want to SSH into the box which can be achieved with:
ssh vagrant@localhost -p 2222
The details can be retrived just like avagrant box with: