Preparing the database

Before we can expand the functionality of our routes, we need to define the models of our application, prepare the necessary database schema, and populate the database with some initial data.

Homestead ships with a MySQL server built in, so we can use MySQL for our database; however, it does require a little bit of configuration first, before we can use a MySQL database in our application.

The first step is to open our application's configuration file, which should have been created at .env when we created the application with Composer. Find the line that says DB_DATABASE=homestead and change it to DB_DATABASE=furbook.

We can also add the database name to our Homestead configuration file, so that the database is created automatically ...

Get Laravel 5 Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.