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.
1 parent 70267a5 commit dd84db6Copy full SHA for dd84db6
README.md
@@ -74,6 +74,39 @@ $index = 'id';
74
Batch::update($userInstance, $value, $index);
75
```
76
77
+# Example Increment / Decrement
78
+
79
+```php
80
+use App\Models\User;
81
82
+$userInstance = new User;
83
+$value = [
84
+ [
85
+ 'id' => 1,
86
+ 'balance' => '+500' // Add
87
+ ] ,
88
89
+ 'id' => 2,
90
+ 'balance' => '-200' // Subtract
91
92
93
+ 'id' => 3,
94
+ 'balance' => '*5' // Multiply
95
96
97
+ 'id' => 4,
98
+ 'balance' => '/2' // Divide
99
100
101
+ 'id' => 5,
102
+ 'balance' => '%2' // Modulo
103
104
+];
105
+$index = 'id';
106
107
+Batch::update($userInstance, $value, $index);
108
+```
109
110
# Example Insert
111
112
```php
0 commit comments