How To Create A Simple REST API in PHP

preview_player
Показать описание
How To Create A Simple REST API in PHP. JSON.

Buy Me a Coffee ;)

Hosting I Use:
Рекомендации по теме
Комментарии
Автор

sorry, but that's called fetching data from a DB and returning it as json... the key component of a REST API is the use of RESTful urls and i can't spot any in this video... that's without mentioning how "spaghetti code" this example in your video was

ilyeschouia
Автор

In which universe is this an API? It's an overcomplicated way of echoing json through PHP. Nonsense.

DeanPickersgill
Автор

Can I use this for Android application to call data using volley or retrofit library?

pandurangpnaik
Автор

Isto não é uma API REST, rest utiliza os protocolos HTTP (PUT, POST, GET, DELETE)

thallesrangel
Автор

Hi there,
Thanks for the tutorial!
But what would you do if you had other methods like to update to store records ? Would you declare the database connection object in each ?
In my opinion, it would be better to have that object as a property of the class API, and pass it to the constructor when creating the object (dependency injection).

THBADRO
Автор

This video helped me alot to see how the api works in php

fullstackdeveloper
Автор

Hi,
May i know why we use API, because every work if we want, do custom. So why we create API ? May you please explane...

subhodeepbhattacharjee
Автор

Can someone explain why everyone prefers to use XAMPP on Windows systems, and not WAMP?

charlesluck
Автор

Bruh, how is this a "rest" API. This is like returning data from a database in json format lol.

ellixt
Автор

Whats about sub urls?
like localhost/users/5

atwa
Автор

How can I return array that has many objects .. not object inside an object

I mean by object => associative array

j.almadhaji
Автор

I receive the following error
Parse error: syntax error, unexpected '__DIR__' (T_DIR) in C:\xampp\htdocs\index.php on line 2
why??

nestaho
Автор

sry, Victor, I cant buy you a coffee cause I live in Belarus. Its too hard to use paypal as a payment system :) but the lesson is very excellent... I can understand your eng speech

courvoisier
Автор

We can use Postman too! Excellent tutorial.

robeeeeen
Автор

how can i integrate this code with my website to make api?

hardigohel
Автор

I tried accordingly....but it's throwing some error...
The error is like...CLass 'Connect' not found....
Can anybody plz help me out with this

ifrakouser
Автор

Thanks for this tutorial 🌹, but please reduce your microphone's noise

mahyarbehzadi
Автор

how we add error like if this wrong error this etc

developeraccount
Автор

So, this is the rest API? I thought it was hard, like something different. How about if we send data like picture or file etc. How does it work in rest API?

imadeekosatriawiguna
Автор

But it's showing error in reactjs. 'Access-Allow-Origin'

Pls help me

sazyt