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 a7045cc commit 2d98e85Copy full SHA for 2d98e85
queries.md
@@ -1130,6 +1130,15 @@ $users = DB::table('users')
1130
->get();
1131
```
1132
1133
+Finally, using the `->` operator, the results can be sorted by a value within a JSON column:
1134
+
1135
+```php
1136
+$corporations = DB::table('corporations')
1137
+ ->where('country', 'US')
1138
+ ->orderBy('location->state')
1139
+ ->get();
1140
+```
1141
1142
<a name="latest-oldest"></a>
1143
#### The `latest` and `oldest` Methods
1144
0 commit comments