Skip to content

Commit e33ab65

Browse files
valid
1 parent 7580327 commit e33ab65

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,43 @@ git clone https://github.com/codewithsushil/json-db.git
88
cd json-db
99
php -S localhost:8888
1010
curl http://localhost:8888
11+
```
12+
13+
## setup
14+
```php
15+
$db = new jsondb(__dir__);
16+
17+
```
18+
19+
## Post
20+
```php
21+
$db->post("users", [
22+
'id' => 1,
23+
'name' => 'jhon',
24+
'email' => '[email protected]',
25+
'create_at' => '20:34:05:05:2025'
26+
]);
27+
```
28+
29+
## Get
30+
```php
31+
$db->get("users", true); // all data
32+
$db->get("users", $id); // single data
33+
```
34+
35+
## update
36+
```php
37+
$db->update("users",$id, [
38+
'name' => 'lily'
39+
])
40+
```
41+
42+
## delete
43+
```php
44+
$db->delete("users", $id);
45+
```
46+
47+
## search or like?
48+
```
49+
$db->search('users','jhon');
50+
```

0 commit comments

Comments
 (0)