Create a PHP REST API : Write a RESTful API from Scratch using Plain, Object-Oriented PHP and MySQL

Create a PHP REST API : Write a RESTful API from Scratch using Plain, Object-Oriented PHP and MySQL43:53

Información de descarga y detalles del video Create a PHP REST API : Write a RESTful API from Scratch using Plain, Object-Oriented PHP and MySQL

Autor:

Dave Hollingworth

Publicado el:

6/5/2022

Vistas:

112K

Descripción:

Learn how to develop a complete, RESTful API using plain, object‑oriented PHP and MySQL, covering everything from creating RESTful URLs to handling CRUD operations, organizing code with controllers and table gateways, returning appropriate HTTP status codes, validating data, and encoding/decoding JSON requests and responses. 00:00 Introduction 00:18 API client 00:31 Front controller 01:38 RESTful endpoints 02:03 URL rewriting 03:03 HTTPie usage 03:28 Routing 03:59 404 response 04:23 Collection and resource URLs 05:19 Controller class 06:27 Class autoloading 08:19 Process the request 09:06 Collection requests 09:55 JSON Content‑type 10:56 Create the database 11:53 Connect to the DB 14:08 Exception handling 16:44 Table gateway class 17:42 List all records 19:52 Encode JSON values 21:35 Insert a record 21:55 Get request data 27:04 201 response 28:00 Error handling 30:00 Data validation 31:46 422 response 32:28 405 response 33:36 Resource requests 34:43 Get a resource 35:59 404 response 37:02 Update a resource 40:03 Conditional validation 41:12 Delete a resource 43:12 Summary