dev-master
9999999-devSimple And Flexible database in JSON file
MIT
The Requires
by Andrey Mistulov
0.1.0
0.1.0.0Simple And Flexible database in JSON file
MIT
The Requires
by Andrey Mistulov
Simple And Flexible database in JSON file
Simple And Flexible database in JSON file, (*1)
composer require prowebcraft/php-json-db
Create JsonDb instance, (*2)
$db = new \Prowebcraft\JsonDb([ 'name' => 'users.json', 'dir' => getcwd() ]);
Add some data, (*3)
$db->set('user', [ 'firstname' => 'John', 'lastname' => 'Doe' ]);
Add more data to existing array, (*4)
$db->set('user.age', 18);
Save data to storage, (*5)
$db->save();
You will get file in current working directory named users.json with sample data:, (*6)
{ "user": { "firstname": "John", "lastname": "Doe", "age": 18 } }
Get items, (*7)
$db->get('user.age');
Simple And Flexible database in JSON file
MIT
Simple And Flexible database in JSON file
MIT