Skip to content

Commit 61436ab

Browse files
committed
Update readme
1 parent 71d4e20 commit 61436ab

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,20 @@ Schema::create('table', function (Blueprint $table) {
195195

196196
```
197197

198+
Sort keys by default works for `asc` sort queries. If you would like to create a sort key with `desc` order, you can use the `sortKeyDesc` method.
199+
200+
```php
201+
Schema::create('table', function (Blueprint $table) {
202+
$table->string('name');
203+
204+
$table->sortKeyDesc('name');
205+
});
206+
207+
Schema::create('table', function (Blueprint $table) {
208+
$table->string('name')->sortKeyDesc();
209+
});
210+
```
211+
198212
### Series Timestamps
199213
To denote a column as a series timestamp, use the `seriesTimestamp` column modifier.
200214

0 commit comments

Comments
 (0)