Mô tả

In this course I will be showing you how to create RESTful web services with PHP, no third party frameworks or paid software is needed.


We will be covering the basics of what REST is and how to implement the basics using pure vanilla PHP, at the end of this course you should be able to create a basic RESTful web service that you can allow other people to use.


The course will follow a scenario that we have been given and that is to implement a web service which can record a list of tasks, basically a to-do list. We will be implementing each requirement one at a time and then we will add on the ability for this API to become a multi user service. So each user can securely have their own task list.


To do this we will be implementing an authentication concept called Token based authentication and we will be exploring this further within the course, Token based authentication is a lot more secure than just basic password authentication and is now a best practice among the industry.


We will be starting at the beginning and building as we go, as long as you know the basics of PHP, such as variables, if statements, loops, arrays and some basic object orientated programming concepts you should be able to follow this course to the end. We will also be using MySQL for the database to store the tasks and we will be building and changing the database as we go, and again you don't need to be an expert on MySQL but just need to know the fundamentals such as basic select, update, delete SQL statements and concepts such as primary keys and foreign keys.


BONUS SECTION ADDED - for CORS (Cross-Origin Resource Sharing) which will allow you to adjust this API to run on a different domain/subdomain than your front end application.


BONUS SECTION ADDED - for teaching you how to upload images/files against a task, we will go through the changes we need to make to the API to allow uploading of images to a task. We will then allow you to associate image attributes such as title and filename against the image as well as being able to download the image and delete the image.

Bạn sẽ học được gì

How to build a REST web services (API) with plain PHP (no frameworks required)

What Token Based Authentication is and why it is better than Basic Authentication

Fundamental Principles of REST

API Testing using Postman App

How to upload and delete files using a REST API

Yêu cầu

  • Fundamentals of PHP (including basic Object Oriented Programming concepts)
  • Fundamentals of Basic SQL Queries
  • Fundamentals of MySQL Database
  • Fundamentals of JSON (basic structure)

Nội dung khoá học

13 sections

Introduction

3 lectures
Introduction
01:35
Course Contents
02:19
Project Scenario
00:28

REST

1 lectures
What is REST?
08:19

Set up

1 lectures
Software Set Up
06:09

API Requirements

2 lectures
Tasks API Requirements
03:34
Authentication API Requirements
02:23

Demo

1 lectures
Demo of Completed API - What we are going to build
24:13

Tasks API Set Up

5 lectures
Tasks Database and Tasks Table Creation
12:33
Set Up API Folder Structure
04:35
Create the Response Model
38:58
Set Up the Database Connection
22:52
Create the Task Model
32:55

Tasks API Endpoint Implementation

7 lectures
GET - Get a Single Task
44:41
DELETE - Delete a Single Task
09:27
GET - Get All Complete and Incomplete Tasks
22:22
GET - Get All Tasks
17:47
GET - Get All Tasks - With Pagination
37:02
POST - Create a Task
49:19
PATCH - Update a Task
55:22

Mid Course Review

1 lectures
Review What We Have Done So Far
01:18

Token Based Authentication

7 lectures
Introduction to Token Based Authentication
11:22
Users Table Creation
05:35
POST - Create a User (Sign up user API)
43:00
Sessions Table Creation
07:41
POST - Create a Session (Log user in API)
01:22:23
DELETE - Delete a Session (Log user out API)
25:25
PATCH - Refresh a Session (Get new access token API)
51:20

Refactor Tasks API to Include Authentication

2 lectures
Update Tasks Table - Add User Assignment
04:07
Add Authentication to Tasks API
47:17

Conclusion

2 lectures
Course Conclusion and Demo Client Application
10:49
iOS Demo App Download
00:15

BONUS: Cross-Origin Resource Sharing (CORS) Setup

1 lectures
What is CORS And How Do We Allow This On Our REST API
16:41

BONUS: Allow image upload against a task

12 lectures
Introduction to Image Uploading
10:22
Demo of Upload Image API
15:53
Implement Folder Structure To Store The File Uploads
05:16
Task Image Database Table Creation
05:22
Implement The Image Model
34:30
Implement The Image Route Logic
38:27
POST - Implement The Upload Image Route
01:06:03
GET - Implement The Get Image Attributes Route
12:20
GET - Implement The Getting Of The Actual Image File
16:45
PATCH - Implement The Update Image Attributes Route
43:18
DELETE - Implement The Image Deletion Route
19:44
Update Current Task API To Integrate Images
37:44

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.