High Definition Standard Definition Theater
Video id : X51KOJKrofU
ImmersiveAmbientModecolor: #f38615 (color 1)
Video Format : 22 (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: Opus - Normalized audio
PokeTubeEncryptID: cb7d4e12776347e25a239ae6e41bccb7125714f8cd8d66abb53e20e587b979ed21ab153b4560300d93d8797e4970d39f
Proxy : eu-proxy.poketube.fun - refresh the page to change the proxy location
Date : 1715308891759 - unknown on Apple WebKit
Mystery text : WDUxS09KS3JvZlUgaSAgbG92ICB1IGV1LXByb3h5LnBva2V0dWJlLmZ1bg==
143 : true
Create a PHP REST API : Write a RESTful API from Scratch using Plain, Object-Oriented PHP and MySQL
Jump to Connections
79,761 Views β€’ May 6, 2022 β€’ Click to toggle off description
Learn how to develop a complete, RESTful API using plain, object-oriented PHP, MySQL and best practices.

Full API course, including authentication:
β€£ davehollingworth.net/phpapisy

Please consider supporting my channel:
β˜• ko-fi.com/davehollingworth

In this video you'll learn how to:
β€’ create RESTful URLs
β€’ list, show, create, update and delete database records using an API
β€’ organise your PHP code
β€’ use controllers and table gateways
β€’ return relevant HTTP status codes
β€’ validate data in an API
β€’ decode and encode requests and responses as JSON

Code shown in the video:
β€£ github.com/daveh/php-rest-api

Relevant documentation:
β€£ curl.se/
β€£ www.postman.com/
β€£ httpie.io/
β€£ www.php.net/manual/en/function.set-exception-handl…
β€£ www.php.net/manual/en/pdo.setattribute.php
β€£ www.php.net/manual/en/class.errorexception.php

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

#PHP #MySQL #REST #API
Metadata And Engagement

Views : 79,761
Genre: Science & Technology
Date of upload: May 6, 2022 ^^


Rating : 4.97 (14/1,827 LTDR)
RYD date created : 2024-05-09T01:49:53.595452Z
See in json
Tags
Connections
Nyo connections found on the description ;_; report a issue lol

YouTube Comments - 185 Comments

Top Comments of this video!! :3

@dave-hollingworth

2 years ago

Out of interest, what data are you creating an API for?

23 |

@zzzbyyy

8 months ago

my php back end skills are archaic ... so before I dive in any api php framework I want to learn how to do it in plain PHP ... this tutorial is a blessing for me ...

7 |

@manojphatak763

5 months ago

Quite simply: the best php tutorial I have seen so far! Thank you for your crystal clear explanations.

8 |

@collenzaligway4458

2 years ago

I love how clearly you explain things. Please keep posting videos cause its really straight forward and help me learn a lot.

18 |

@vasurupolia9481

1 year ago

Dude, you must be a pro! Thanks for such a detailed description. I'm actually amazed why there are so less comments and likes. You deserves a million of likes and subscribers. Subscribed!😊

10 |

@william254

1 year ago

One of the best tutorials I've seen, including paid ones. I really appreciate it and would love to see more.

8 |

@GenaroDesiaCoppola

10 months ago

hands-down one of the best coding tutorials I've seen, thank you, this helps me a lot

4 |

@NedumEze

1 year ago

Come on Dave, I am still feeling dizzy watching this Video. How can you be so good! Simply no daylight between you and PHP ! Am in awe. Thank you so much, Dave. Sorry for myself trying to understand what you have taught so very well

3 |

@med3060

2 years ago

I've been searching for such amazing lesson for so long thank you so much Dave .

10 |

@muhammadsharif5526

1 year ago

undoubtedly, one of the best PHP API instructors... full stop... subscribed

1 |

@ademineshat

2 years ago

Very nice and modern PHP Crash course. Absolutely awesome. Thanks πŸ™

7 |

@dobrinivanov395

9 hours ago

This is great! Perfect amount of explanation. I still have to dig in as I dont have PHP experience and this was exactly what I needed. great job!

|

@shadrackkipkoech2075

1 year ago

The tuitorial was perfect. Very invaluable πŸ†πŸ†πŸ†

1 |

@chieeyeoh6204

4 months ago

I came from Node and Python. Your tutorial pace very well and the content was concise, gave me the confidence to build one API server with PHP todday.

1 |

@royschrauwen

1 year ago

Thank you very much for such a great tutorial! You explained everything very clearly, and the tutorial was easy to follow.

2 |

@johnlabuci96

4 months ago

you're very good dave, you teach and introduce us to the new term like table gateway pattern and many more along the tutorial.. kudos

|

@NedumEze

1 year ago

Stunning presentation. Wow! Dave. My jaw is on the floor! Thanks

|

@ll18307

7 months ago

This is just what I need, Thank you very much. I love how the topic is explained, very concise and straight forward.

|

@robertbinkowski

1 year ago

This was amazing! Keep up the amazing work!

1 |

@rodrodrigues1729

1 year ago

Best PHP RESTful API Tutorial ever. Close the other tabs and stick to this one.

|

Go To Top