Главная
Study mode:
on
1
Introduction
2
API client
3
Front controller
4
RESTful endpoints
5
URL rewriting
6
HTTPie usage
7
Routing
8
404 response
9
Collection and resource URLs
10
Controller class
11
Class autoloading
12
Process the request
13
Collection requests
14
JSON Content-type
15
Create the database
16
Connect to the DB
17
Exception handling
18
Table gateway class
19
List all records
20
Encode JSON values
21
Insert a record
22
Get request data
23
201 response
24
Error handling
25
Data validation
26
422 response
27
405 response
28
Resource requests
29
Get a resource
30
404 response
31
Update a resource
32
Conditional validation
33
Delete a resource
34
Summary
Description:
Develop a complete RESTful API from scratch using plain, object-oriented PHP and MySQL in this comprehensive 44-minute tutorial. Learn to create RESTful URLs, manage database records through API operations, organize PHP code efficiently, implement controllers and table gateways, return appropriate HTTP status codes, and handle JSON encoding/decoding for requests and responses. Explore best practices for API development, including data validation, error handling, and exception management. Follow along as the instructor guides you through setting up a front controller, implementing URL rewriting, connecting to a database, and creating endpoints for listing, showing, creating, updating, and deleting records. Gain practical insights into using tools like cURL, Postman, and HTTPie for API testing and interaction.

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

Dave Hollingworth
Add to list
0:00 / 0:00