Add New Project To Laravel Homestead

If you want to add a new project to laravel homestead, you have to perform the following steps:

Edit Homestead.yaml

nano ~/.homestead/Homestead.yaml

Add project

[...]
sites:
    [...]
    - map: test.app
      to: /home/vagrant/Code/test/public
[...]
databases:
    [...]
    - test
[...]

You have to add the project at sites and databases.

Provision

vagrant up --provision

Install dependencies

SSH-Session öffnen:

vagrant ssh

Go to the project directory:

cd /home/vagrant/Code/test

Install dependencies:

composer install
npm install

Extend /etc/hosts

Edit /etc/hosts:

[...]
192.168.10.10  test.app
[...]

Now, the new project should be completly set up. Check that by opening the URL http://test.app.