You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DynamoDB [supports Atomic Counter](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html#WorkingWithItems.AtomicCounters). When we call `increment()` and `decrement()` through Model or Query Builder, Atomic Counter will be used under the hood.
663
+
664
+
```php
665
+
DB::('Thread')->key([
666
+
'ForumName' => 'Laravel',
667
+
'Subject' => 'Laravel Thread 1'
668
+
])->increment('Replies', 2);
669
+
```
670
+
671
+
We can also pass additional attributes to update.
672
+
673
+
```php
674
+
DB::('Thread')->key([
675
+
'ForumName' => 'Laravel',
676
+
'Subject' => 'Laravel Thread 1'
677
+
])->increment('Replies', 2, [
678
+
'LastPostedBy' => 'User A',
679
+
]);
680
+
```
681
+
641
682
### DynamoDB-specific operators for condition() and filter()
642
683
643
684
For `condition` and `filter` clauses, we can use DynamoDB's comparators and functions.
0 commit comments