Skip to content

Dominik-developer/php-rest-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a PHP REST API

NOTE ‼️ This repo is fork, I only added forn-end to this project and JS

Don not put main.html with css and js in same folder as API. It should look something like this:

  • htdocs/

    • main.html
    • styles.css
    • scripts.js
    • php-rest-api/
      • index.php
      • src/

    I know, it does not supprt messages/errors from api



Original README:

Source code to accompany this video: https://youtu.be/X51KOJKrofU

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

Topics covered in the video

  • Basic REST API routing and URLs
  • List, show, create, update and delete database records using a RESTful API
  • Best-practice code organisation
  • Controllers and table gateways
  • Relevant HTTP status codes
  • Data validation
  • JSON decoding and encoding

Complete API course, including authentication: https://davehollingworth.net/phpapisy

About

PHP rest api for products with front-end

Resources

License

Stars

Watchers

Forks

Languages

  • PHP 59.0%
  • JavaScript 23.0%
  • CSS 9.0%
  • HTML 9.0%