Skip to content

Commit b1ac1e2

Browse files
README.md update
1 parent 92e273e commit b1ac1e2

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- 🧩 **Document-Based:** Each collection is a JSON file; each record is a structured JSON document.
1919
- 🧪 **CRUD Operations:** Easy-to-use API for create, read, update, and delete operations.
2020
- 🕵️‍♂️ **Search & Filter:** Built-in query capabilities using associative arrays and conditions.
21+
- [ ] Upcoming soon
2122
- 🔐 **JWT & Session Authentication:** Secure API with optional login/auth guard.
2223
- 🌐 **REST API Wrapper:** JSON RESTful interface for HTTP clients.
2324
- 🗃️ **Transactions & Atomic Writes:** Prevents data corruption with locking mechanisms.
@@ -52,8 +53,21 @@
5253

5354
## 🧑‍💻 How It Works
5455

56+
#### Install
57+
58+
```bash
59+
composer require jsondbphp/jsondb
60+
```
61+
62+
#### Example
63+
5564
```php
56-
use JsonDB\JsonDB;
65+
66+
// index.php
67+
68+
require("vendor/autoload.php"):
69+
70+
use Json\Database;
5771

5872
// Create DB instance
5973
$db = new JsonDB(__DIR__ . '/data');
@@ -75,9 +89,3 @@ $db->collection('users')->delete($id);
7589
```
7690

7791
---
78-
79-
## Install
80-
81-
```bash
82-
composer require jsondbphp/jsondb
83-
```

0 commit comments

Comments
 (0)