我尝试重启我的mac并重新启动虚拟机,但没有任何工作:'(
的/ etc /主机
192.168.10.10 laravel.app
192.168.10.10 larabook.app
Homestead.yaml
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: laravel.app
to: /home/vagrant/Code/Laravel/public
- map: larabook.app
to: /home/vagrant/Code/Larabook/public
databases:
- homestead
- larabook
答案 0 :(得分:37)
假设您的Homestead.yaml文件在上面
输入:
$ vagrant global-status
将显示类似的内容;
id name provider state directory
--------------------------------------------
77c5c30 default virtualbox running et....
输入:
$ vagrant provision 77c5c30
当然这假设您只有1个VM,如果您有其他人,那么在您运行vagrant provision时读取该指令
答案 1 :(得分:2)
这对我有用,并没有丢失数据库:
$ homestead halt
$ homestead up --provision
答案 2 :(得分:0)
尝试
folders: - map: ~/Code/Laravel to: /home/vagrant/Code/Laravel - map: ~/Code/Larabook to: /home/vagrant/Code/Larabook sites: - map: laravel.app to: /home/vagrant/Code/Laravel/public - map: larabook.app to: /home/vagrant/Code/Larabook/public databases: - homestead - larabook
注意:查看我对文件夹部分所做的更改。 从https://www.easylaravelbook.com/blog/configuring-multiple-laravel-homestead-sites-and-databases/#top
中查找更多信息after run $ homestead halt $ homestead up --provision