windows 7 使用 homestead 上运行 laravel 项目切换页面每次都要 5-10 s,最快也得 5 s,正常的本地环境或者是服务器环境只需要 200 ms左右,因此肯定是 homestead 的问题,解决方案是:
1、首先,命令行进入 Homestead 启动 vagrant
cd ~/Homestead && vagrant up
2、然后运行安装命令
vagrant plugin install vagrant-winnfsd
3、安装成功后修改配置文件:
> homestead/scripts/homestead.rb下
# Register All Of The Configured Shared Folders
if settings.include? 'folders'
settings["folders"].each do |folder|
if File.exists? File.expand_path(folder["map"])
mount_opts = []
if (folder["type"] == "nfs")
mount_opts = folder["mount_options"] ? folder["mount_options"] : ['actimeo=1', 'nolock']
elsif (folder["type"] == "smb")