Reputation:
I have done few projects with laravel. I also tried to use the good practise such us using only models for all calls and use artisian commands.
In my next project i plan to use still more such as using Homestead.
I read more about Laravel Homestead which actually needs Vagrantup.
But i don't know the actual need of Homestead and how to install it.
Any help would be helpful for me and future readers.
Upvotes: 0
Views: 473
Reputation: 2136
I assume you already install VirtualBox or VMWare. After downloading Homestead from Git, you need to amend Homestead.yaml file
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: /Users/Documents/workspace/myssh.pub #pub path
keys:
- /Users/Documents/workspace/myssh #ssh key
folders:
- map: /Users/Documents/workspace/dev/myProject #My project directory
to: /home/vagrant/code/myProject #Vagrant project directory, no need to change this /home/vagrant/code/
sites:
- map: yourproject.app #you can change whatever you prefer
to: /home/vagrant/code/myProject/public #no need to change this /home/vagrant/code/
variables:
- key: APP_ENV
value: local
Then, we remain one final step to amend. Open hosts file under /etc/. I will use VI to amend this. You can use whatever you like.
vi /etc/hosts
You need to add new line in this file
192.168.10.10 yourproject.app //same with code line 11
Finally, you just only need to run vagrant up. Please don't forgot one thing. If you shutdown your PC without shutdown your vagrant, it's take too long to shutdown your PC. Even your PC is shutdown, vagrant might be crushed when you run again vagrant up. Before your shutdown your PC, you need to run vagrant halt for safe.
Hope this help.
Upvotes: 1