Skip to content

Commit

Permalink
fix: fixing scout search (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk authored Mar 4, 2022
1 parent 3062103 commit 00c5083
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Services/Search/RepositorySearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function search(RestifyRequest $request, Repository $repository): Builder

$query = $this->prepareMatchFields(
$request,
$this->prepareSearchFields(
$repository::usesScout()
? $this->prepareRelations($request, $scoutQuery ?? $repository::query($request))
: $this->prepareSearchFields(
$request,
$this->prepareRelations($request, $scoutQuery ?? $repository::query($request)),
),
Expand Down

0 comments on commit 00c5083

Please sign in to comment.