Skip to content

Instantly share code, notes, and snippets.

@amercier
Last active October 20, 2017 12:28
Show Gist options
  • Save amercier/9a1205f82531653a94a559b291260c59 to your computer and use it in GitHub Desktop.
Save amercier/9a1205f82531653a94a559b291260c59 to your computer and use it in GitHub Desktop.
Laravel Homestead per-project setup for MacOS

Laravel Homestead setup for MacOS

Requirements

  1. Homebrew
  2. VirtualBox
  3. Vagrant: brew install vagrant
  4. Composer: brew tap caskroom/cask && brew cask install vagrant
  5. Laraver installer: composer global require laravel/installer

Installation

  1. Scaffold Laravel
cd ~/Workspace
laravel new laravel-homestead-playground
cd laravel-homestead-playground
  1. Configure Homestead
composer require laravel/homestead --dev
vendor/bin/homestead make
sed -i '' 's/192\.168\.10\.10/10.0.0.10/' Homestead.yaml
sed -i '' 's/homestead\.test/laravel-homestead-playground.app/' Homestead.yaml
vagrant up
  1. Add to /etc/hosts:
10.0.0.10 laravel-homestead-playground.app
  1. Visit http://laravel-homestead-playground.app/

Next steps

Migrate database:

DB_PORT=33060 php artisan migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment