PHP REST API without using any frameworks. Contains all CRUD operations.

Related tags

API mysql api php
Overview

PHP REST API without any framework and CRUD operations

🖐 Hi there, this is a simple REST API built in PHP without using any frameworks. This is built for the folks who are just getting started with APIs. As we all know that first working on core PHP gains a lot of knowledge on API, rather than jumping directly and relying on frameworks. So, I've built this simple PHP API that contains all CRUD operations. As an example, I've taken a student database with just name, address, and age as its table columns and have performed CRUD operations on it using APIs. Feel free to use this code and work around it. Hope you got the insights!

📧 Contents

/api folder contains all PHP files for the CRUD operations

/config folder contains Mysql database configurations

/db folder contains database(.sql) file

/models folder contains a single Student.php for database logic

😀 How to use this project

  1. Well, first clone or download this repo.

  2. Create a database and import db/studentdb.sql file in your database.

  3. Change database configurations in config/Database.php file.

  4. Check your endpoints.

📌 Endpoints

  1. http://localhost/php_rest_api_without_framework/api/get.php GET METHOD
  2. http://localhost/php_rest_api_without_framework/api/get_one.php GET METHOD
  3. http://localhost/php_rest_api_without_framework/api/post.php POST METHOD
  4. http://localhost/php_rest_api_without_framework/api/put.php PUT METHOD
  5. http://localhost/php_rest_api_without_framework/api/delete.php DELETE METHOD

📰 License

MIT

❤️ Loved this project?

Please give me a star to this repo, I'll be happy 😊 .

🔗 Let's connect!

linkedin

twitter

twitter

medium

You might also like...
A REST API that should power the Agile Monkeys CRM Service

This is a simple REST API that purposes to power the Agile Monkeys CRM service

A lightweight REST API framework

php-microframework A minimal PHP 8 REST API built onto php-microframework. Features Automatic routing based on URL path, e.g. https://domain/controlle

Laravel Client REST Camunda API

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Osclass REST API plugin.

Osclass API Osclass API plugin, with all the required endpoints and JWT auth. Osclass App (Native + PWA) You always wanted a mobile app for Osclass, d

Joy VoyagerApi module adds REST Api end points to Voyager with Passport and Swagger support.
Joy VoyagerApi module adds REST Api end points to Voyager with Passport and Swagger support.

Joy VoyagerApi This Laravel/Voyager module adds REST Api with Passport and Swagger support to Voyager. By 🐼 Ramakant Gangwar. Prerequisites Composer

A rest api repository with laravel.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

A rest api repository with laravel.

API Back End This is the repository for the TKJ 1 Class 12 Web Back End API system, for detailed info, you can go to the main link of the Front End ap

A chess REST API.
A chess REST API.

Chess API A chess REST API. Documentation Read the latest docs here. Installation Clone the chesslablab/chess-api repo into your projects folder as it

API-Rest para información sobre administración-politica de Cuba

API_CUBA API desarrollada con Laravel PHP para brindar servicios REST para multiples plataformas sobre información politico administrativa de API_CUBA

Owner
Hanoak
Hanoak
A RESTful API package for the Laravel and Lumen frameworks.

The Dingo API package is meant to provide you, the developer, with a set of tools to help you easily and quickly build your own API. While the goal of

null 9.3k Jan 7, 2023
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
Simple PHP API client for tube-hosting.com rest API

Tube-Hosting API PHP client Explanation This PHP library is a simple api wrapper/client for the tube-hosting.com api. It is based on the provided docu

null 4 Sep 12, 2022
GraphQL API to Studio Ghibli REST API

GhibliQL GhibliQL is a GraphQL wrapper to the Studio Ghibli REST API Usage First, you'll need a GraphQL client to query GhibliQL, like GraphQL IDE Con

Sebastien Bizet 8 Nov 5, 2022
API Laravel com funcionalidades CRUD avançadas.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

null 1 Oct 26, 2021
Single file PHP script that adds a REST API to a SQL database

PHP-CRUD-API Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database. NB: This is the TreeQL referen

Maurits van der Schee 3.2k Jan 8, 2023
PHP REST API Framework

PSX Framework About PSX is a framework written in PHP dedicated to build REST APIs. It is based on multiple components which cover many aspects of the

Apioo 121 Dec 30, 2022
A simple, extensible REST API framework for PHP

Note: This framework is not stable yet. Introduction Aphiria is a suite of small, decoupled PHP libraries that make up a REST API framework. It simpli

Aphiria 119 Dec 23, 2022
Phalcon PHP REST API Package, still in beta, please submit issues or pull requests

PhREST API A Phalcon REST API package, based on Apigees guidelines as found in http://apigee.com/about/content/web-api-design Please see the skeleton

PhREST 29 Dec 27, 2022
example repository training REST API

adalah codebase REST-API dari tugas peserta yang mengikuti training membangun REST API dengan lumen selama 2 minggu. studi kasus nya adalah REST API website marketplace untuk agrobisniss.

Nuris Akbar 6 Sep 4, 2021