Writing to the database

Now that we're receiving the request body as JSON, we can put this data in our database.

Let's require our Item model at the top of the controller. Then, in the create method, we'll create a new Item, using the request body.

This is a companion discussion topic for the original entry at https://vuejsdevelopers.com/lessons/writing-to-the-database-1/