Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Homestead provides a ready development environment for Laravel

Friday, February 6th, 2015 by Servage

homestead-laravel-vagrantThe PHP framework Laravel is currently one of the most popular frameworks. It is widely adopted and liked for its ease of use and good learning curve. You can read about getting started with Laravel in one of our earlier blog posts.

Nowadays being able to speed up development time is very important. Constant changes in available technologies and new trends online dictate a high pace of new things to follow or use for a while, until the next thing comes along. Missing out on new trends is dangerous, because users quickly penalize sites for being out of date or lacking user friendliness.

We have previously covered how Vagrant provides a good way of using local development platforms which are close to the live environment, and identical among all the developers’ own systems. This reduces the amount of issues from working under different conditions, and generally speeds up testing processes, because it reduces platform specific issues. Laravel has introduced Homestead to make this process even smoother for Laravel developers.

Homestead is a ready-to-go Vagrant box for your local development

Using Homestead to union Laravel and Vagrant in a development-ready system is great for PHP developers, because they can focus even more on their core task of coding. Maintenance and other overhead cannot be totally avoided, by Homestead definitely helps you as a developer to focus on the most important tasks at hand. You do not want to spend any unnecessary second on server configuration when your job is to design a website or build an API.

Getting starting with Homestead

It is fairly simple to get started with Homestead. You just need to follow a few short steps (the following is for Mac-based systems). Start by downloading the ready made Homestead box for Vagrant (right after you installed VirtualBox and Vagrant):

vagrant box add laravel/homestead

You also need to get the Homestead command line tool:

composer global require "laravel/homestead=~2.0"

Now you need to initialize the Homestead box to get the YAML configuration file ready:

homestead init

The YAML configuration file can now be edited using the following command:

homestead edit

You need to configure SSH keys and shared folders according to your preferences. The details of those settings exceed the scope of this article, but you can refer to the general Laravel documentation for this. After successful configuration you can start the box with (the IP is depending on local configuration):

192.168.1.1 homestead.app

And now you should have your new app ready to access via:

http://homestead.app

Building faster

It may take a little while to get used to working with Vagrant and Homestead, but it is definitely time well spent for the enjoyment of quicker development workflows later on. Therefore consider to invest the time in streamlining local development platforms once and for all, whereafter you can go back to what you really want to focus on: Happy coding! :-)

References & more reading

 

Homestead provides a ready development environment for Laravel, 3.0 out of 5 based on 2 ratings
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.