PHPackages                             mg3lo/mysql-crud-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mg3lo/mysql-crud-api

ActiveLibrary[Database &amp; ORM](/categories/database)

mg3lo/mysql-crud-api
====================

MySql Crud Api Library

v1.0.0(3y ago)129MITPHP

Since Mar 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/markusoft/mysql-crud-api)[ Packagist](https://packagist.org/packages/mg3lo/mysql-crud-api)[ RSS](/packages/mg3lo-mysql-crud-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

What is MySql CRUD API
======================

[](#what-is-mysql-crud-api)

[MySql Crud Api](https://github.com/markusoft/mysql-crud-api) is a Plug and Play PHP Library created to Auto-magically build CRUD capabilities for your MySql Database using RESTful API calls. This library is dependent to [Mysql Crud Library](https://github.com/markusoft/mysql-crud) which is another Plug and Play PHP Library similar to Query Builder and Eloquent ORM but on Steroids.

Easy Peasy Summary
==================

[](#easy-peasy-summary)

```
C-reate  POST http://your-website.com/{route}/{database-table-name}
R-ead    GET http://your-website.com/{route}/{database-table-name}/{id}/{related-table-name}/{id}?{parameter}={value}
U-pdate  PUT|PATCH http://your-website.com/{route}/{database-table-name}/{id}
D-elete  DELETE http://your-website.com/{route}/{database-table-name}/{id}

```

DescriptionHTTP VerbURLAll RecordsGETRecord IDGETFiltered RecordsGETSearch RecordsGETPaginationGET[http://your-website.com/crud/products?limit=100&amp;offset=100](http://your-website.com/crud/products?limit=100&offset=100)Sort and OrderGET[http://your-website.com/crud/products?sort=price&amp;order=asc](http://your-website.com/crud/products?sort=price&order=asc)Child RecordsGETRelated RecordsGETAdd Record/sPOSTAdd Related RecordsPOSTUpdate a RecordPUT or PATCHUpdate RecordsPUT or PATCHDelete a RecordDELETEDelete RecordsDELETETable of Contents
=================

[](#table-of-contents)

- [What is MySql CRUD API](#what-is-mysql-crud-api)
- [Easy Peasy Summary](#easy-peasy-summary)
- [Installation](#installation)
    - [Install via Composer](#install-via-composer)
    - [Manual installation](#manual-installation)
    - [PHP Users](#php-users)
    - [Codeigniter Users](#codeigniter-users)
    - [Laravel Users](#laravel-users)
    - [Other PHP Frameworks](#other-php-frameworks)
- [Retrieving Records](#retrieving-records)
    - [All Records](#all-records)
    - [Single Records](#single-records)
    - [Filtered Records](#filtered-records)
    - [Child Records](#child-records)
    - [Related Records](#related-records)
    - [Search Records](#search-records)
- [Parameters](#parameters)
    - [API Key](#api-key)
    - [Limit and Offset](#limit-and-offset)
    - [Sort and Order](#sort-and-order)
    - [Envelop](#envelop)
    - [Case](#case)
    - [Format](#format)
- [Creating Records](#creating-records)
    - [Create Single Record](#create-single-record)
    - [Create Multiple Records](#create-multiple-records)
- [Updating Records](#updating-records)
    - [Update Single Record](#update-single-record)
    - [Update Multiple Records](#update-multiple-records)
- [Deleting Records](#deleting-records)
    - [Delete Multiple Records](#delete-multiple-records)
- [Configuration File](#configuration-file)

Installation
============

[](#installation)

To install this project, you have two options:

Install via Composer
--------------------

[](#install-via-composer)

To install using Composer, run the following command:

```
composer require mg3lo/mysql-crud-api

```

Manual Installation
-------------------

[](#manual-installation)

To install manually, follow these steps:

1. Download the [library](https://github.com/markusoft/dev-tools/raw/main/Mg3lo.zip) from [developer tools](https://github.com/markusoft/dev-tools).
2. Unzip the downloaded file to your extensions directory.

### System requirements

[](#system-requirements)

- PHP 7.0 or higher
- MySQL 5.0 or higher

Note: Tested on the following versions but might work on older versions as well.

PHP Users
---------

[](#php-users)

1. Download the sample [installation](https://github.com/markusoft/dev-tools/raw/main/PHP-MySqlCrudApi%20v%5B1.0.0%5D.zip) or Install via composer

    ```
    composer require mg3lo/mysql-crud-api
    ```
2. Load the library on php file

    ```
