Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hasaneryilmaz committed Dec 14, 2021
1 parent 1be7c92 commit be927d8
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
# PHP-Automatic-CRUD
PHP Automatic Crud Operations
PHP Automatic Crud Operations Web API

## What is PHP-Automatic-CRUD ?
PHP-Automatic-CRUD is a PHP library that provides automatic CRUD operations for your database.

## Installation
- Realede version : [Download](https://github.com/hasaneryilmaz/PHP-Automatic-CRUD/releases "Download")
- Put the api folder in your system directory.
- or
- Composer install : `composer create-project hascoding/webapi myapp`

- Put the api folder in your system directory.
- and
- Make your database settings in api/DbConnect.php file.
-
- Import the hascoding_api_auth.sql file in the api folder into your database.
- Create a new token from the hascoding_api_auth table in your database.
- Everything is ready.

## How to use ?

> https://{sitename}/api/{table_name}/{table_column_name}/{id}
> https://{sitename}/api/{table_name}/{table_column_name}/{id}?auth_key={auth_token}
- auth_key = '3bb5e585b3b20a089ba46b7d55c74b50';
- table_name = 'users';
- table_column_name = 'Id';
- id = 1;

> https://{sitename}/api/users/Id/1
> https://{sitename}/api/users/Id/1?auth_key=3bb5e585b3b20a089ba46b7d55c74b50
## Methods for {table_name}
- GET: Get all records from {table_name}
> https://{sitename}/api/{table_name}
> https://{sitename}/api/{table_name}?auth_key={auth_token}
- GET: Get a record from {table_name} by id
> https://{sitename}/api/{table_name}/{table_column_name}/{id}
> https://{sitename}/api/{table_name}/{table_column_name}/{id}?auth_key={auth_token}
- POST: Create a new record in {table_name}
> https://{sitename}/api/{table_name}
> https://{sitename}/api/{table_name}?auth_key={auth_token}
- PUT: Update a record in {table_name} by id
> https://{sitename}/api/{table_name}/{table_column_name}/{id}
> https://{sitename}/api/{table_name}/{table_column_name}/{id}?auth_key={auth_token}
- DELETE: Delete a record in {table_name} by id
> https://{sitename}/api/{table_name}/{table_column_name}/{id}
> https://{sitename}/api/{table_name}/{table_column_name}/{id}?auth_key={auth_token}
- DELETE: Delete all records in {table_name}
> https://{sitename}/api/{table_name}/delete
> https://{sitename}/api/{table_name}/delete?auth_key={auth_token}

0 comments on commit be927d8

Please sign in to comment.