Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Commit a504352

Browse files
committed
Fix paginate calls
1 parent e3785df commit a504352

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/Engines/TypesenseSearchEngine.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,16 @@ public function search(Builder $builder)
9090
public function paginate(Builder $builder, $perPage, $page)
9191
{
9292
return $this->performSearch(
93-
$builder,
94-
[
95-
'q' => $builder->query,
96-
'query_by' => implode(',', $builder->model->typesenseQueryBy()),
97-
'filter_by' => $this->filters($builder),
98-
'per_page' => $perPage,
99-
'page' => $page,
100-
]
93+
$builder,
94+
array_filter(
95+
[
96+
'q' => $builder->query,
97+
'query_by' => implode(',', $builder->model->typesenseQueryBy()),
98+
'filter_by' => $this->filters($builder),
99+
'per_page' => $perPage,
100+
'page' => $page,
101+
]
102+
)
101103
);
102104
}
103105

0 commit comments

Comments
 (0)