What is Laravel's Homestead?
Posted on February 29, 2020  (Last modified on December 27, 2022 )
2 minutes • 315 words
This project uses these versions of languages, frameworks, and libraries.
-
laravel
: 6
-
php
: 7.2
This tutorial may work with newer versions and possibly older versions, but has only been tested on the versions mentioned above.
Laravel is, as far as PHP frameworks go, extremely popular. In their guide, the Laravel community recommends you use Homestead as your local development environment. But what is Laravel’s homestead and why use it?
Laravel’s Homestead
Homestead is Laravel’s suggested development environment for building Laravel applications in PHP. Homestead is packaged as a vagrant box (a virtual machine) and is aimed to simply the initial setup of your Laravel project.
Why use Homestead?
Laravel actually has a fairly specific set of requirements that need to be met if you are to develop for it. Homestead bundles all of these requirements and has them already set up for you in an easy to use Vagrant box. This takes away the uncertainty of setting up multiple development environments the same way, as the box can be shared across your development team.
Do I have to use Homestead while building my Laravel application?
You don’t have to use Homestead while building your Laravel application, however, you will need to put some effort into setting up your development environment correctly. As of Laravel version 6.x, your local environment needs access to the following:
- PHP >= 7.2.0
- BCMath PHP Extension
- Ctype PHP Extension
- JSON PHP Extension (this should be included in your PHP standard library if using the required PHP version mentioned above)
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
With this in mind, I would definitely recommend using Homestead instead of manually managing each of these extensions on every dev-team member’s machines. That being said, the choice is yours!
Hopefully this helps explain what Laravel’s homestead is and why you would use it. If you’d like to learn about other interesting topics in PHP, you can find the topic on my site here ! Additionally, the documentation for Homestead can be found here if you’d like to dig deeper into it !