Mac 下升级 Laravel Valet 2.x 到 3.x
1. 删除老版本
composer global remove laravel/valet
2. 安装新版本
composer global require laravel/valet
3. 初始化 Valet 配置信息
$ valet install
Stopping nginx...
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration for php@8.1...
Restarting php@7.4...
Restarting php...
Updating Dnsmasq configuration...
Restarting dnsmasq...
Valet is configured to serve for TLD [.test]
Restarting nginx...
Valet installed successfully!
4. 命令行指定站点 PHP 版本
valet isolate php@7.4 --site=mysitename
关于此功能,请见: 翻译:Laravel Valet 3 发布,支持多版本 PHP(终于等到你)
5. 使用 PHP Monitor 管理站点
什么是 PHP Monitor ? 请见 —— 翻译:PHP Monitor: 从 macOS 状态栏管理 PHP 和 Valet
推荐文章: