Skip to content

Commit

Permalink
Merge pull request #5798 from kennith/framework/31498
Browse files Browse the repository at this point in the history
[6.x] Documents groupByRaw
  • Loading branch information
taylorotwell authored Feb 21, 2020
2 parents ab7050a + 3ea1fd4 commit 067b4c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ The `orderByRaw` method may be used to set a raw string as the value of the `ord
->orderByRaw('updated_at - created_at DESC')
->get();

### `groupByRaw`

The `groupByRaw` method may be used to set a raw string as the value of the `group by` clause:

$orders = DB::table('orders')
->select('city', 'state')
->groupByRaw('city, state')
->get();

<a name="joins"></a>
## Joins

Expand Down

0 comments on commit 067b4c0

Please sign in to comment.