10.02.2018 Views

easylaravel-sample

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 1. Introducing Laravel 19<br />

1 folders:<br />

2 - map: ~/Code/dev.larabrain.com<br />

3 to: /home/vagrant/dev.larabrain.com<br />

4 - map: ~/Code/dev.todoparrot.com<br />

5 to: /home/vagrant/dev.todoparrot.com<br />

6<br />

7 sites:<br />

8 - map: dev.larabrain.com<br />

9 to: /home/vagrant/dev.larabrain.com/public<br />

10 - map: dev.todoparrot.com<br />

11 to: /home/vagrant/dev.todoparrot.com/public<br />

12<br />

13 databases:<br />

14 - dev_larabrain_com<br />

15 - dev_todoparrot_com<br />

Notice how I’ve also defined two different databases, since each application will logically want its<br />

own location to store data.<br />

After saving these changes, you’ll want your virtual server to be reconfigured accordingly. If<br />

you have never started your virtual server, running vagrant up will be suffice because the<br />

Homestead.yaml file had never previously been read. However, if you’ve already started the VM<br />

then you’ll need to force Homestead to reprovision the virtual machine. This involves reloading the<br />

configuration. To do so, you’ll first need to find the identifier used to present the currently running<br />

machine:<br />

1 $ vagrant global-status<br />

2 id name provider state directory<br />

3 --------------------------------------------------------------<br />

4 6f13a59 default virtualbox running /Users/wjgilmore/Homestead<br />

Copy and paste that id value (6f13a59 in my case), supplying it as an argument to the following<br />

command:<br />

1 $ vagrant reload --provision 6f13a59<br />

2 ==> default: Attempting graceful shutdown of VM...<br />

3 ==> default: Checking if box 'laravel/homestead' is up to date...<br />

4 ==> default: Clearing any previously set forwarded ports...<br />

5 ==> default: Clearing any previously set network interfaces...<br />

6 ==> default: Preparing network interfaces based on configuration...<br />

7 ...<br />

Once this command completes, your latest Homestead.yaml changes will be in place!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!