Skip to content

Commit 95e3179

Browse files
committed
Updating documentation for increment and decrement.
1 parent dde2f09 commit 95e3179

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

queries.md

+8
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,16 @@ Sometimes you may need to use a raw expression in a query. These expressions wil
197197

198198
DB::table('users')->increment('votes');
199199

200+
DB::table('users')->increment('votes', 5);
201+
200202
DB::table('users')->decrement('votes');
201203

204+
DB::table('users')->decrement('votes', 5);
205+
206+
You may also specify additional columns to update:
207+
208+
DB::table('users')->increment('votes', 1, array('name' => 'John'));
209+
202210
<a name="inserts"></a>
203211
## Inserts
204212

0 commit comments

Comments
 (0)