Learn to Write REST APIs from Scratch Want to learn how to write fully-tested REST APIs and microservices with PHP? I will walk you through developing an API and teach you how to test your code along the way. In this book you will learn how to use Lumenβa micro-framework by Laravelβto write bu
Lumen Programming Guide: Writing PHP Microservices, REST and Web Service APIs
β Scribed by Paul Redmond (auth.)
- Publisher
- Apress
- Year
- 2016
- Tongue
- English
- Leaves
- 258
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Learn to write test-driven microservices, REST APIs, and web service APIs with PHP using the Lumen micro-framework, from the now popular Laravel family. This book shows you how testing APIs can help you write bullet-proof web application services and microservices.
In the Lumen Programming Guide you will learn how to use Lumenβa micro-framework by Laravelβto write bullet-proof APIs. Lumen helps you write productive, maintainable APIs using modern application design. You will learn how to write fully-tested APIs and understand essential Lumen concepts used to build a solid foundation for writing API projects.
What You Will Learn
- Maintain your API's database structure through built-in database migrations
- Write tests with factory data in a test database
- Respond with consistent data output in JSON
- Deal with PHP exceptions by using JSON responses
- Create, read, update, and delete REST resources
- Represent model associations in API responses
- Build a solid foundation for writing tests with PHPUnit and Mockery
- Validate data
Who This Book Is For
PHP developers with no Laravel experience. Only a basic understanding of HTTP and writing PHP applications is needed to get started.
β¦ Table of Contents
Front Matter....Pages i-xx
Installing Lumen....Pages 1-6
Hello Lumen....Pages 7-16
Creating the Book Application....Pages 17-22
Starting the Books API....Pages 23-32
Creating, Reading, Updating, and Deleting Books....Pages 33-63
Responding to Errors....Pages 65-88
Leveling Up Responses....Pages 89-124
Validation....Pages 125-135
Authors....Pages 137-163
The /authors API Resource....Pages 165-199
Book Bundles....Pages 201-217
Ratings....Pages 219-242
Back Matter....Pages 243-247
β¦ Subjects
Web Development;Programming Techniques;Programming Languages, Compilers, Interpreters
π SIMILAR VOLUMES
PEAR is the PHP Extension and Application Repository, and is a framework and distribution system for reusable, high-quality PHP components, available in the form of packages. In this book, you will learn how to use a number of the most powerful PEAR packages available to boost your PHP development
Learn the basic architectural concepts and step through examples of consuming and creating RESTful web services in PHP. This book targets PHP developers who want to build or make use of RESTful web services, or explore the options available to them in PHP. You will need to know the basics of PHP dev
Representational State Transfer (REST) is a form of software architecture; systems that follow it are often called RESTful. It is the architectural style that drives the World Wide Web (the motivation for REST was to capture elements that made the Web successful), and RESTful web services use simple
<Div> Whether you’re sharing data between two internal systems or building an Api so users can access their data, this practical book provides everything you need to build web service Apis with Php. Author Lorna Jane Mitchell uses code samples, real-world examples, and advice based on her exte
Whether youβre sharing data between two internal systems or building an API so that users can access their data, this practical guide has everything you need to build APIs with PHP. Author Lorna Jane Mitchell provides lots of hands-on code samples, real-world examples, and advice based on her extens