O'Reilly logo

Lumen Programming Guide: Writing PHP Microservices, REST and Web Service APIs by Paul Redmond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© 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: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required