Skip to content

Commit

Permalink
Fix confusing documentation for Media::setNewOrder method (#3759)
Browse files Browse the repository at this point in the history
  • Loading branch information
rottifant authored Jan 6, 2025
1 parent d80d47e commit 63c6aed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/advanced-usage/ordering-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ You can easily reorder a list of media by calling ̀Media::setNewOrder`:
```php
/**
* This function reorders the records: the record with the first id in the array
* will get order 11, the record with the second id will get order 2, ...
* will get the starting order (defaults to 1), the record with the second id
* will get the starting order + 1, and so on.
*
* A starting order number can be optionally supplied (defaults to 1).
* A starting order number can be optionally supplied.
*
* @param array $ids
* @param int $startOrder
Expand Down
3 changes: 2 additions & 1 deletion src/MediaCollections/Models/Concerns/IsSorted.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public function scopeOrdered(Builder $query): Builder

/*
* This function reorders the records: the record with the first id in the array
* will get order 1, the record with the second it will get order 2, ...
* will get the starting order (defaults to 1), the record with the second id
* will get the starting order + 1, and so on.
*
* A starting order number can be optionally supplied.
*/
Expand Down

0 comments on commit 63c6aed

Please sign in to comment.