diff --git a/src/Repositories/Behaviors/HandleBrowsers.php b/src/Repositories/Behaviors/HandleBrowsers.php index d5a1583ab..455c50f76 100644 --- a/src/Repositories/Behaviors/HandleBrowsers.php +++ b/src/Repositories/Behaviors/HandleBrowsers.php @@ -201,12 +201,7 @@ function ($relatedElement) use ($titleKey, $routePrefix, $relation, $moduleName, return [ 'id' => $relatedElement->id, 'name' => $relatedElement->titleInBrowser ?? $relatedElement->$titleKey, - 'edit' => $relatedElement->adminEditUrl ?? moduleRoute( - $moduleName ?? $relation, - $routePrefix ?? '', - 'edit', - $relatedElement->id - ), + 'edit' => $this->getAdminEditUrl($relatedElement), 'endpointType' => $relatedElement->getMorphClass(), ] + (classHasTrait($relatedElement, HasMedias::class) ? [ 'thumbnail' => $relatedElement->defaultCmsImage(['w' => 100, 'h' => 100, 'fit' => 'crop']),