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_10

10. The /authors API Resource

Paul Redmond

(1)Phoenix, Arizona, USA

In this chapter, you are going to build on the last chapter’s introduction to the authors table. You will start working on API endpoints for your dedicated Author resource! At this point, you should be familiar with the basics of defining routes and working with controllers. Reference Chapter 4 and Chapter 5 to get a refresher as needed.

The author endpoint will provide API endpoints for getting author details and the books they’ve authored. Along the way I will show you a really cool feature of Fractal that allows you to include associated transformer data in a response; this means you can easily ...

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