From e02a25563f352cb0ef3a17ba43900507cea57367 Mon Sep 17 00:00:00 2001 From: Glenn Jacobs Date: Thu, 30 May 2024 10:51:56 +0100 Subject: [PATCH] Fix media relationship manager (#1794) The media titles and descriptions were broken in the admin panel. --- .../src/Support/RelationManagers/MediaRelationManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/admin/src/Support/RelationManagers/MediaRelationManager.php b/packages/admin/src/Support/RelationManagers/MediaRelationManager.php index eb9f7555b2..7891b5c248 100644 --- a/packages/admin/src/Support/RelationManagers/MediaRelationManager.php +++ b/packages/admin/src/Support/RelationManagers/MediaRelationManager.php @@ -56,12 +56,12 @@ public function table(Table $table): Table ->heading(function () { $product = $this->getOwnerRecord(); - return $product->getMediaCollectionTitle(config('lunar.media.collection')) ?? Str::ucfirst($this->mediaCollection); + return $product->getMediaCollectionTitle($this->mediaCollection) ?? Str::ucfirst($this->mediaCollection); }) ->description(function () { $product = $this->getOwnerRecord(); - return $product->getMediaCollectionDescription(config('lunar.media.collection')) ?? ''; + return $product->getMediaCollectionDescription($this->mediaCollection) ?? ''; }) ->recordTitleAttribute('name') ->modifyQueryUsing(fn (Builder $query) => $query->where('collection_name', $this->mediaCollection)->orderBy('order_column'))