Commit 2827c3fc by Taylor Otwell

Document group_by.

parent 0339a327
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
- [Dynamic Where Clauses](#dynamic) - [Dynamic Where Clauses](#dynamic)
- [Table Joins](#joins) - [Table Joins](#joins)
- [Ordering Results](#ordering) - [Ordering Results](#ordering)
- [Grouping Results](#grouping)
- [Skip & Take](#limit) - [Skip & Take](#limit)
- [Aggregates](#aggregates) - [Aggregates](#aggregates)
- [Expressions](#expressions) - [Expressions](#expressions)
...@@ -185,6 +186,13 @@ Of course, you may sort on as many columns as you wish: ...@@ -185,6 +186,13 @@ Of course, you may sort on as many columns as you wish:
->order_by('name', 'asc') ->order_by('name', 'asc')
->get(); ->get();
<a name="grouping"></a>
## Grouping Results
You can easily group the results of your query using the **group_by** method:
return DB::table(...)->group_by('email')->get();
<a name="limit"></a> <a name="limit"></a>
## Skip & Take ## Skip & Take
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment