Quantcast
Viewing all articles
Browse latest Browse all 4

Learn Laravel. Homestead.

Homestead is Laravel’s official Vagrant box. It comes preconfigured with a lot of tools you might need. It really makes things a lot easier and quicker.

notice
These instructions are specific to OS X Yosemite however these concepts can be applied to other operating systems like Windows or Linux.

To install Homestead we will pull it’s Vagrant file as well as it’s CLI helper utility from github. Git is already installed on OS X Yosemite so just run this command in terminal:

git clone https://github.com/laravel/homestead.git Homestead

This will create a new directory. Inside will be few files but let’s start with configuration. Run this command inside the Homestead directory:

bash init.sh

This will create a configuration file but let’s leave it alone for now. Before we can start the VM we need to create a place for it to pull site files from. This is configured in the mentioned file but we can use the default location. Use this command to create the Code directory:

mkdir ~/Code

If you want to use a different path you will need to edit the following file:

~/.homestead/Homestead.yaml

One last piece we need is to tell our machine how to pull up Homestead website. To do that we need to edit a hosts file. Run this command:

open -a TextEdit /private/etc/hosts

This will open that file in a text editor. Add this line:

192.168.10.10 homestead.app

Of course you can use vi if you are comfortable.

At this point you can start the Homestead box. Read my article on Vagrant for more information.

At first I mentioned Homestead CLI helper. We really don’t need it for anything and since it requires Composer let’s just leave it alone.

I hope you enjoyed this lesson. Check out the Table of Contents post for more.

The post Learn Laravel. Homestead. appeared first on MattStypa.com.


Viewing all articles
Browse latest Browse all 4

Trending Articles