New Feature: Setup Homestead Per Project

New Feature: Setup Homestead Per Project

Over the weekend, Homestead received a new update that allows you to run it on a per project basis. Previously Homestead was designed so that you install it once on your system and share all your sites within the virtual machine. Joe Ferguson created the pull request to help get this feature implemented and he has a full write up on his blog.

To install Homestead directly into your project all that is required is pulling it in using Composer:

composer require laravel/homestead

Once Homestead has been installed, use the make command to generate the Vagrantfile and Homestead.yaml file in your project root. The make command will automatically configure the sites and folders directives in the Homestead.yaml file:

php vendor/bin/homestead make

You can also set hostname and name values for the virtual machine. It is important to note that you can’t have more than one vagrant machine with the same name. By default the make command will use your project’s folder name as the box name.

php vendor/bin/homestead make --name=VagrantName --hostname=myhost

For more information consult the official documentation on this new feature.

Filed in: News / Homestead


Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Software Engineer Lead (PHP)
CivicPlus, LLC
Full-time Senior Web Developer
Detroit, MI
Wayne State University
Senior Software Engineer
Sydney, Australia
Full Stack Engineer
Remote or Medford, Oregon
Empire Medical
Laravel Developer (fulltime - Dutch only)
Qbixx | Webservices
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Senior Quality Assurance Engineer
Bisnow Media