File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 18
18
- 🧩 ** Document-Based:** Each collection is a JSON file; each record is a structured JSON document.
19
19
- 🧪 ** CRUD Operations:** Easy-to-use API for create, read, update, and delete operations.
20
20
- 🕵️♂️ ** Search & Filter:** Built-in query capabilities using associative arrays and conditions.
21
+ - [ ] Upcoming soon
21
22
- 🔐 ** JWT & Session Authentication:** Secure API with optional login/auth guard.
22
23
- 🌐 ** REST API Wrapper:** JSON RESTful interface for HTTP clients.
23
24
- 🗃️ ** Transactions & Atomic Writes:** Prevents data corruption with locking mechanisms.
52
53
53
54
## 🧑💻 How It Works
54
55
56
+ #### Install
57
+
58
+ ``` bash
59
+ composer require jsondbphp/jsondb
60
+ ```
61
+
62
+ #### Example
63
+
55
64
``` php
56
- use JsonDB\JsonDB;
65
+
66
+ // index.php
67
+
68
+ require("vendor/autoload.php"):
69
+
70
+ use Json\Database;
57
71
58
72
// Create DB instance
59
73
$db = new JsonDB(__DIR__ . '/data');
@@ -75,9 +89,3 @@ $db->collection('users')->delete($id);
75
89
```
76
90
77
91
---
78
-
79
- ## Install
80
-
81
- ``` bash
82
- composer require jsondbphp/jsondb
83
- ```
You can’t perform that action at this time.
0 commit comments