Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confusing documentation for Media::setNewOrder method #3759

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading