REST APIs: Learn By Coding

rest-api-cover.jpgOne of the best ways to learn how to do something is to do it. That's what we do in this book.

We use the Laravel PHP framework to build two API clients and three API servers. You don't need to know Laravel, though, to use this book, and most of the knowledge is transferable to other languages and frameworks.

You can buy the book on Amazon.

Table of Contents

  • 1. Introduction
  • 2. Homestead
  • 3. Yes/No Client
  • 4. Yes/No Server
  • 5. JSON Store Client
  • 6. JSON Store Server
  • 7. API Design
  • 8. Customers
  • 9. Items
  • 10. Orders
  • 11. Security
  • 12. Conclusion


Laravel is a great framework for building standard web apps. I've actually written a couple books that cover how to do this. You can find them at my website:

It's also a great platform for building REST APIs. It can be confusing, though, if you've never built one before. So, in this book, we're going to build three of them. They'll progress from extremely simple to fairly complicated.

Note that you do need to be able to program in PHP to follow along. If you don't know PHP, read my PHP book first. You can buy it at Amazon: It'll bring you up to speed quickly, so you can start programming web apps and APIs.

It'll also help if you are familar with Laravel. It's not mandatory though. If you haven't used it before, just follow along, and if you get lost, dive into the Laravel documentation until it makes sense again. I'll be linking to it freely as we proceed.

Finally, I know it can be difficult reading code in Kindle ebooks. So I've created a GitHub repository that includes the final code for each chapter. You can find it by visiting my website.

Source Code