Setting up Laravel 5.2 with Homestead on a Mac

On your Mac

Download Vagrant box

vagrant box add laravel/homestead

Install Homestead

cd ~
git clone Homestead

Initialise Homestead

cd Homestead

You will now have a ~/.homestead/Homestead.yaml file where you can edit your sites and configurations

Setup route to Vagrant box

sudo vi /etc/hosts

add the following line:

Startup your Vagrant box

vagrant up

On your Vagrant box

SSH into box

ssh -lvagrant -p2200

 Install Laravel installer

cd /root
composer global require "laravel/installer"

add to /root/.bashrc

export PATH="/root/.composer/vendor/bin:$PATH"

reload bashrc source /root/.bashrc

Install laravel

cd /home/vagrant/Code
laravel new blog
cd blog
php artisan make:auth
php artisan migrate:install
php artisan migrate:refresh

Tips and tricks

Configuring new sites

Edit ~/.homestead/Homestead.yaml

Run vagrant provision from ~/Homestead dictory

Destory the Vagrant box

cd ~/Homestead
vagrant destory

Creating new sites

Simply add to sites in Homestead.yaml and run vagrant reload

- map:
  to: /home/vagrant/first/public
- map:
  to: /home/vagrant/second/public


Official Docs