Recently, I've gotton a chance to update and maintain a website backed by Laravel and Voyager. While coming across the installation of development environment of Laravel Homestead, I encounter several problems. This article shows all the steps I've done to successfully run the website.
After that, Hyper-V in Window Features is required in Control Panel. You will have you restart the computer to let these changes to take place.
2. VirtualBox and Vagrant
Download VirtualBox and Vagrant and install them for the purpose of VM management.
3. Git Bash
Download Git Bash and install it for the later Linux commands to be execute on Windows.
4. Homestead
Open git bash and input the following command to add Homestead to your Vagrant installation.
Navigate to the root directory (~) or and directory you wanted to place Homestead VM, and then run the following command to clone the repository.
Edit the configuration file (Homestead.yml) as you needed.
5. ssh key (optional)
There is ssh-keygen tools in git bash.
6. Multiple php version management (optional)
In the terminal of Homestead, you can use update-alternatives to show the available php version installed.
With sudo update-alternatives --config php, you can change the versions Homestead VM uses.
7. Symbolic Link (optional)
If there is an error message for symbolic link whle running the Laravel project, you will have to set up the rights for creating symbolic links for your user account. Run secpol.msc in Win+R.
Go to Local Policies -> User Rights Assignment -> create symbolic links and add your user to this property.
8. MySQL Workbench (optional)
With MySQL Workbench, you can input the appropriate connection settings and use the GUI to design your database. The default settings of Homestead database can be found here: Connecting To Databases.
9. Starting up Homestead
Move the current working directory of git bash to Homestead and use the command vagrant up to start Homestead VM.
You can use vagrant ssh to connect to Homestead VM.
Conclusion
Despite of the errors throughout these steps, I can now start to develop new functions for the website which is written Laravel and Voyager.