参考記事
https://www.hypertextcandy.com/multiple-projects-in-laravel-homestead
Homestead.ymlファイルを2箇所修正
sites:
- map: homestead.test
to: /home/vagrant/code/laravel/public
- map: second.test
to: /home/vagrant/code/second/public
databases:
- homestead
- second
viでhostsを編集
sudo vi /etc/hosts
192.168.10.10 homestead.test second.test
.env
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=second
DB_USERNAME=homestead
DB_PASSWORD=secret
vagrant再起動
# vagrant を抜ける
$ exit
# ローカルに戻ったら、vagrantをストップ
$ vagrant halt
# vagrant 再起動
$ vagrant up --provision
以上