We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cebab8 commit 6ef22a3Copy full SHA for 6ef22a3
src/InteractsWithMedia.php
@@ -546,11 +546,8 @@ public function loadMedia(string $collectionName): Collection
546
547
$collection = new MediaCollections\Models\Collections\MediaCollection($collection);
548
549
- $modelWithoutMedia = (clone $this)->unsetRelation('media');
550
-
551
return $collection
552
->filter(fn (Media $mediaItem) => $collectionName !== '*' ? $mediaItem->collection_name === $collectionName : true)
553
- ->each(fn (Media $mediaItem) => $mediaItem->setRelation('model', $modelWithoutMedia))
554
->sortBy('order_column')
555
->values();
556
}
0 commit comments