© Paul Redmond 2016

Paul Redmond, Lumen Programming Guide, 10.1007/978-1-4842-2187-7_9

9. Authors

Paul Redmond

(1)Phoenix, Arizona, USA

So far your /books endpoint provides an author column on the books database table. Making authors a string field on the books table was intentional so that you could focus on other primary concepts of building your API, but now you are ready to create proper author data and provide API endpoints for author data.

This chapter will cover the following:

  • Creating the authors database schema

  • Creating a relationship between book data and authors

  • Creating API endpoints for author information

  • Modifying your /books endpoint to use new author data

The Authors Database Schema

Creating the authors database table involves a few migrations: ...

Get Lumen Programming Guide: Writing PHP Microservices, REST and Web Service APIs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.