Skip to content

Commit

Permalink
docs: demo example
Browse files Browse the repository at this point in the history
  • Loading branch information
faustoq committed Jul 19, 2024
1 parent 01a1a38 commit 240ad3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ yarn-error.log
/.idea
/.vscode
/vendor
composer.lock
composer.lock
demo/search.php
demo/deploy.php
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ $index->empty();

// Insert records
$index->insert([
['id' => 1, 'name' => 'John Doe', 'age' => 20 ],
['id' => 2, 'name' => 'Mario Rossi', 'age' => 25 ]
['id' => '1', 'name' => 'John Doe', 'age' => 20 ],
['id' => '2', 'name' => 'Mario Rossi', 'age' => 25 ],
['id' => '3', 'name' => 'John Smith', 'age' => 35 ],
]);

// Update records
$index->update([[ 'id' => 1, 'name' => 'Jane Doe', 'age' => 30 ]]);
$index->update([[ 'id' => '1', 'name' => 'Jane Doe', 'age' => 30 ]]);

// Delete records
$index->delete([[ 'id' => 1 ]]);
$index->delete(['1', '2']);

// Trigger deployment
$index->deploy();
Expand Down

0 comments on commit 240ad3d

Please sign in to comment.