Skip to content

Commit ffef644

Browse files
Corrected saveObjects call example (#702)
The provided example used a single dimensional array as an argument for the `saveObjects()` method. As saveObjects saves an array of objects, it generated an error. I updated the example to use a single `saveObject()` method, which I find easier to understand as a beginner than a two-dimensional array argument for `saveObjects()`
1 parent 8d78421 commit ffef644

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $client = Algolia\AlgoliaSearch\SearchClient::create(
4545

4646
$index = $client->initIndex('your_index_name');
4747

48-
$index->saveObjects(['objectID' => 1, 'name' => 'Foo']);
48+
$index->saveObject(['objectID' => 1, 'name' => 'Foo']);
4949
```
5050

5151
Finally, you may begin searching a object using the `search` method:

0 commit comments

Comments
 (0)