We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0da8594 + 99f239a commit 41ae58eCopy full SHA for 41ae58e
firestore/src/update_doc_increment.php
@@ -38,13 +38,13 @@ function update_doc_increment($projectId)
38
$db = new FirestoreClient([
39
'projectId' => $projectId,
40
]);
41
- # [START fs_update_doc_array]
+ # [START fs_update_doc_increment]
42
$cityRef = $db->collection('cities')->document('DC');
43
44
// Atomically increment the population of the city by 50.
45
$cityRef->update([
46
['path' => 'regions', 'value' => FieldValue::incremet(50)]
47
48
- # [END fs_update_doc_array]
+ # [END fs_update_doc_increment]
49
printf('Updated the population of the DC document in the cities collection.' . PHP_EOL);
50
}
0 commit comments