Hi, this is dog-ears.
今回は、Windows10上でLaravel Homestead 環境構築をする方法について、まとめました。
This time, I summarized how to build Laravel Homestead environment on Windows 10.
■Laravel 5.8 Laravel Homestead (Official)
(1) Install virtual box
(2) Install Vagrant
(3) Create project folder at local. And Open command Prompt. move to project folder
I will talk project folder as [project folder].
(4) Create box file
vagrant box add laravel/homestead
There is one question, and I answered “virtualbox".
(5) Clone Git repository
git clone https://github.com/laravel/homestead.git Homestead cd Homestead
At this point, the directory structure is as follows.
(6) Initialize＆ edit Homestead.yaml
next, create two folder.
code folder to place code,and .ssh folder to place ssh keys as follows.
last, edit Homestead.yaml
folders: - map: C:\[fullpath to project folder]\code to: /home/vagrant/code sites: - map: homestead.test to: /home/vagrant/code/public
There are two point.
write [full-path to project folder] at folders map.
（default [~/code] show some errors in my case ）
At sites-map, It is recommended to use default 'homestead.test’.
Some other homepage use “homestead.app".
but “homested.app" is used and make something wrong.
(7) Edit host file
(8) Create SSH Keys
move to .ssh folder. And execute follow.
ssh-keygen -t rsa
(9) Start vagrant
(10) login with ssh
Everything is done.
After that,Install laravel as follows
sudo composer self-update composer create-project laravel/laravel code --prefer-dist
and You can see your page in follow address.
But, If you run laravel dusk (Browser test), Some errors are occured.
About the dusk environment construction, I will summarize in the next article.