From 240ad3dc41aee21bd37b99d915dbf582a875b28e Mon Sep 17 00:00:00 2001 From: Fausto Quaggia Date: Fri, 19 Jul 2024 18:21:33 +0200 Subject: [PATCH] docs: demo example --- .gitignore | 4 +++- README.md | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bfbaa45..09a3c1e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ yarn-error.log /.idea /.vscode /vendor -composer.lock \ No newline at end of file +composer.lock +demo/search.php +demo/deploy.php \ No newline at end of file diff --git a/README.md b/README.md index 587fb8a..eacc8e6 100644 --- a/README.md +++ b/README.md @@ -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();