Wednesday , September 20 2017
Home / IT Books / Lumen Programming Guide

Lumen Programming Guide

Laravel Homestead is the best development environment choice because it provides a complete development environment for all your Laravel and Lumen projects. Homestead provides some solid benefits for your development environment as well, including the following:
• Isolated environment on a virtual machine
• Works on Windows, Mac, and Linux
• Easily configure all your projects in one place

Lumen has two types of middleware configuration: global middleware and route middleware. What is the difference between the two types? Global middleware runs on every HTTP request and route middleware runs on specific routes (or groups of routes) configured to run the middleware.

Chapter 1: Installing Lumen
Homestead
Mac OSX
Linux
Red Hat/CentOS
Debian/Ubuntu
Windows
Conclusion
Chapter 2: Hello Lumen
Setting Up a New Project
Routes
The Hello World Route
Route Parameters
Middleware and Responses
Global Middleware
Route Middleware
The Request and Response Objects
The Request
The Response
Onward
Chapter 3: Creating the Book Application
Building Something Amazing
Environment Setup
Checking Unit Tests
Setup Complete
Chapter 4: Starting the Books API
Creating the First Endpoint
Setting Up Models and Seed Data
Eloquent Books
Success
Chapter 5: Creating, Reading, Updating, and Deleting Books
Requesting an Individual Book
Creating a New Book
Updating an Existing Book
Deleting Books
Chapter 6: Responding to Errors
Test Database
Model Factories
Factories in Tests
Better Error Responses
Framework Exception Handling
JSON Exceptions
Testing the Exception Handler
Chapter 7: Leveling Up Responses
Introducing Fractal
First Version of API Response Formatting
The Fractal Response Class
The Book Transformer
The Fractal Response Class
Fractal Response Service
Integrating the Fractal Response Service
Chapter 8: Validation
First Attempt at Validation
More Validation Constraints
Custom Validation Messages
Other Approaches
Chapter 9: Authors
The Authors Database Schema
Fixing Broken Tests
Chapter 10: The /authors API Resource
The GET /authors Endpoint
The AuthorsTransformer
The Author Controller
The GET /authors/{id} Endpoint
A Basic Response
Including Other Models in the Response
The POST /authors
The PUT /authors/{id} Endpoint
The DELETE /authors/{id} Endpoint
Chapter 11: Book Bundles
Defi ning the Relationship Between Books and Bundles
The GET /bundles/{id} Endpoint
Adding a Book to a Bundle
Remove a Book from a Bundle
Chapter 12: Ratings
Database Design
Rating an Author
Adding an Author Rating
Deleting an Author Rating
Ratings in the Author API
Eager Loading Ratings

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

About huydam

Check Also

Data Science For Dummies 2nd Edition

Get Free Books is a personal website, which shares all my books (used books or …

Leave a Reply

Your email address will not be published. Required fields are marked *