Skip to content

Commit 63c6aed

Browse files
authored
Fix confusing documentation for Media::setNewOrder method (#3759)
1 parent d80d47e commit 63c6aed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/advanced-usage/ordering-media.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ You can easily reorder a list of media by calling ̀Media::setNewOrder`:
1010
```php
1111
/**
1212
* This function reorders the records: the record with the first id in the array
13-
* will get order 11, the record with the second id will get order 2, ...
13+
* will get the starting order (defaults to 1), the record with the second id
14+
* will get the starting order + 1, and so on.
1415
*
15-
* A starting order number can be optionally supplied (defaults to 1).
16+
* A starting order number can be optionally supplied.
1617
*
1718
* @param array $ids
1819
* @param int $startOrder

src/MediaCollections/Models/Concerns/IsSorted.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public function scopeOrdered(Builder $query): Builder
2727

2828
/*
2929
* This function reorders the records: the record with the first id in the array
30-
* will get order 1, the record with the second it will get order 2, ...
30+
* will get the starting order (defaults to 1), the record with the second id
31+
* will get the starting order + 1, and so on.
3132
*
3233
* A starting order number can be optionally supplied.
3334
*/

0 commit comments

Comments
 (0)