Install Vagrant: https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.msi
Install Virtualbox: https://www.virtualbox.org/wiki/Downloads
Install NodeJS 8.x: https://nodejs.org/en/download/current/
Install Yarn:
npm install -g yarn
Copy .env.example
to .env
and modify it as needed. Typically you need to
change the database name to something sensible that matches what's in the
virtual environment.
Run vagrant up
to install & provision the virtual environment.
Vagrant will take a while to provision.
You can then run yarn install
to pull in javascript dependencies.
You may need a vagrant reload
before you can access the site locally.
You can use https://localhost:8000
or, npm run watch
and use https://localhost:3000
Inside the VM (vagrant ssh
)
composer install [author/package]
On your local machine:
yarn install [package]
vagrant up
initializes your virtual dev environmentvagrant halt
halts the environmentvagrant reload
restarts the environmentvagrant provision
will run Ansible on the environment to install necessary softwarevagrant destroy
will delete the environmentvagrant ssh
will open a shell inside the environment
php artisan
will list the available commandsphp artisan migrate
will commence database migrationsphp artisan migrate:refresh
will reverse and re-run migrationsphp artisan db:seed
will run any database seeders
vagrant up
if your virtual environment is not running- Check out a feature branch
- Write code.
- Perform Laravel commands inside your virtual environment via
vagrant ssh
- Submit a pull request.
- Merge your code into the master branch.