25.06.2018 Views

Full-Stack Vue.js 2 and Laravel 5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Database<br />

We'll be using a relational database to persist data in our backend application.<br />

Homestead has MySQL running out of the box; you just have to provide<br />

configuration in the .env file to use it with <strong>Laravel</strong>. The default configuration will<br />

work without any further changes.<br />

.env: DB_CONNECTION=mysql DB_HOST=192.168.10.10 DB_PORT=3306<br />

DB_DATABASE=vuebnb DB_USERNAME=homestead<br />

DB_PASSWORD=secret<br />

Whatever name you choose for your database (that is, the value of DB_DATABASE),<br />

make sure it's added to the databases array in your Homestead.yaml file.<br />

~/Homestead/Homestead.yaml: databases: ... - vuebnb

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!