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. To keep things simple and also show the flexibility of the Eloquent ORM, we are going to use SQLite, a lightweight file-based database.
To configure Laravel to use SQLite, open
app/config/database.php and change the default database connection name from
sqlite. Also make sure that the default database file,
The first and easiest step is to define the models with which our application is going to interact. At the beginning of this chapter, we identified two main ...