Skip to content

Commit 51ae142

Browse files
authored
Fix bug in updateEntryUris and updateEntryOrder (#304)
1 parent cf05ed2 commit 51ae142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Collections/CollectionRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CollectionRepository extends StacheRepository
1313
public function updateEntryUris($collection, $ids = null)
1414
{
1515
$query = $collection->queryEntries()
16-
->when($ids, fn () => $query->whereIn('id', $ids))
16+
->when($ids, fn ($query) => $query->whereIn('id', $ids))
1717
->get()
1818
->each(function ($entry) {
1919
app('statamic.eloquent.entries.model')::find($entry->id())->update(['uri' => $entry->uri()]);
@@ -80,7 +80,7 @@ public static function bindings(): array
8080
public function updateEntryOrder(CollectionContract $collection, $ids = null)
8181
{
8282
$query = $collection->queryEntries()
83-
->when($ids, fn () => $query->whereIn('id', $ids))
83+
->when($ids, fn ($query) => $query->whereIn('id', $ids))
8484
->get(['id'])
8585
->each(function ($entry) {
8686
$dispatch = UpdateCollectionEntryOrder::dispatch($entry->id());

0 commit comments

Comments
 (0)