Skip to content

Commit

Permalink
Merge pull request #47 from akki-io/fix/use-route-key-for-resource
Browse files Browse the repository at this point in the history
fix: use `getRouteKey` for resource page
  • Loading branch information
pxlrbt authored Aug 11, 2024
2 parents a9bea72 + 7bdabd6 commit 2dbc1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/ResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function searchRecord($query): EloquentCollection|Collection|array
->limit(50)
->get()
->map(fn (Model $record) => new SpotlightSearchResult(
$record->getKey(),
$record->getRouteKey(),
$resource::getGlobalSearchResultTitle($record),
collect($resource::getGlobalSearchResultDetails($record))
->map(fn ($value, $key) => $key.': '.$value)
Expand Down

0 comments on commit 2dbc1c5

Please sign in to comment.