为每个项目配置 Homestead 实例:
要将 Homestead 直接安装到项目中,需要使用 Composer:
composer require laravel/homestead --dev
Homestead 安装完后,可以使用 make 命令在项目根目录中生成 Vagrantfile 与 Homestead.yaml 文件。
Mac/Linux:
php vendor/bin/homestead make
Windows:
vendor\\bin\\homestead make
接下来,在终端中运行 vagrant up 并在浏览器中访问你的项目 http://homestead.app。再次提醒:你仍然需要在 /etc/hosts 里配置 homestead.app 或其它想要使用的域名。
网友评论