Skip to content

Commit

Permalink
fixed edit URL for getFormFieldsForBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 committed Mar 22, 2024
1 parent dc2e5ca commit a2c5df6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Repositories/Behaviors/HandleBrowsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down

0 comments on commit a2c5df6

Please sign in to comment.