Database
We'll be using a relational database to persist data in our backend application. Homestead has MySQL running out of the box; you just have to provide configuration in the .env
file to use it with Laravel. The default configuration will work without any further changes.
.env
:
DB_CONNECTION=mysql DB_HOST=192.168.10.10 DB_PORT=3306 DB_DATABASE=vuebnb DB_USERNAME=homestead DB_PASSWORD=secret
Whatever name you choose for your database (that is, the value of DB_DATABASE
), make sure it's added to the databases
array in your Homestead.yaml
file.
~/Homestead/Homestead.yaml
:
databases: ... - vuebnb