Laravel 8 Windows
在系统的任意位置创建一个批处理文件 homestead.bat ,内容如下:
@echo off
set cwd=%cd%
set homesteadVagrant=C:\Homestead
cd /d %homesteadVagrant% && vagrant %*
cd /d %cwd%
set cwd=
set homesteadVagrant=一定要将脚本中 C:\Homestead 路径调整为 Homestead 的实际安装路径。创建文件后,将文件路径添加到 PATH 。然后你就可以在系统任意位置运行 homestead up 或 homestead ssh 等命令。