These instructions should work for Mac, WinOS, and Linux. If everything goes according to plan you will not need to install PHP7 or Composer on your laptop.
By running the code in a pre-packaged VM, we reduce the depencies on the host operating system.
You can find out more about Laravel Homestead on their web site.
-
Download and install VirtualBox 5.1
-
Download and install Vagrant 1.9.3
-
Download and install Git or SourceTree
https://github.com/coloradocarlos/lara54
The following steps are performed from a Cmd prompt in Windows or terminal window on a Mac. Change cp to xcopy in WinOS.
-
> cd lara54
-
> cp .env.example .env
-
> cp Homestead.yaml.example Homestead.yaml
-
Edit Homestead.yaml and change the directories in the file to point to your local file system
Steps below are performed from the host machine.
-
> vagrant up
-
> vagrant ssh
You will then be logged on to the Homestead instance. The screen should look something like this:
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-51-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
3 packages can be updated.
0 updates are security updates.
Last login: Wed Apr 5 01:11:23 2017 from 10.0.2.2
vagrant@lara54:~
This done from the Vagrant guest machine, not the host!
Change into the project directory, for example, lara54.
-
$ cd lara54
-
$ composer install
-
$ php artisan key:generate
From Guest:
$ ngrok http 192.168.10.10:80 -host-header=lara54.app
From Guest:
$ exit
From Host:
> vagrant halt