Skip to content

Commit

Permalink
stan & pint
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 10, 2024
1 parent a0af563 commit 41cfb7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Models/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ public function getSrcset(): Collection
}

/**
* @param null|(Closure(string $previous): string) $sequence
* @param null|(Closure(string $previous): string) $sequence
*/
public static function reorder(array $ids, ?Closure $sequence = null): void
Expand All @@ -425,7 +426,7 @@ public static function reorder(array $ids, ?Closure $sequence = null): void

foreach ($models as $model) {

$model->order = $sequence ? value($sequence, $previous) : ($previous + 1);
$model->order = $sequence ? $sequence($previous) : ($previous + 1);

$previous = $model->order;

Expand Down

0 comments on commit 41cfb7d

Please sign in to comment.