The 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
- Getting Started with Laravel Homestead
- Using Laravel Homestead as Your Development Environment
- Quick Tip: Get a Homestead Vagrant VM Up and Running
- Laravel Homestead Documentation
No comments yet (leave a comment)