diff --git a/src/Entries/EntryRepository.php b/src/Entries/EntryRepository.php index bbe5b9ab..85e25a7c 100644 --- a/src/Entries/EntryRepository.php +++ b/src/Entries/EntryRepository.php @@ -85,8 +85,8 @@ public function updateOrders($collection, $ids = null) $collection->queryEntries() ->when($ids, fn ($query) => $query->whereIn('id', $ids)) ->get(['id']) - ->each(function ($entry, $index) { - $dispatch = UpdateCollectionEntryOrder::dispatch($entry->id(), $index + 1); + ->each(function ($entry) { + $dispatch = UpdateCollectionEntryOrder::dispatch($entry->id(), $entry->order()); $connection = config('statamic.eloquent-driver.collections.update_entry_order_connection', 'default');