Setup lumen using homestead on OSX

1. Downloading and installing VirtualBox manually

https://www.virtualbox.org/wiki/Downloads

2. Downloading and installing Vagrant manually

https://www.vagrantup.com/downloads.html

3. Installing The Homestead Vagrant Box

$vagrant box add laravel/homestead
This is a virtual machine image that runs the operating system.

4. Installing Homebrew (global)

https://brew.sh/

5. Installing Composer via Homebrew (global)

$brew install composer
open ~/.zshrc (if using zsh, or whatever bash profile file we using) and add this to end of file:
export PATH="$PATH:$HOME/.composer/vendor/bin"
we need to reopen terminal.

6. Installing Lumen installer (global)

$composer global require "laravel/lumen-installer"

7. Create new Lumen project

$lumen new NEW_PROJECT

8. Installing Homestead (local)

Go to NEW_PROJECT folder and run this command:
$composer require "laravel/homestead"
This is configurations repo which are used when running homestead virtual machine image.

init Homestead
$php vendor/bin/homestead make
Homestead.yaml will be created like below:
ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa
folders:
    -
        map: #your new project dir
        to: /home/vagrant/code
sites:
    -
        map: homestead.test
        to: /home/vagrant/code/public
databases:
    - homestead
name: NEW_PROJECT
hostname: NEW_PROJECT

9. Config

Add this line to host file /etc/hosts
192.168.10.10 homestead.test

10. Run

Start virtual machine
$vagrant up
and access via browser
http://homestead.test/