Skip to content

Commit 9c92290

Browse files
committed
Pass Query Builder instance to callback
1 parent 2f3bea6 commit 9c92290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PostgresEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ protected function performSearch(Builder $builder, $perPage = 0, $page = 1)
263263
// file or individually for each model in searchableOptions()
264264
// See https://www.postgresql.org/docs/current/static/textsearch-controls.html
265265
$tsQuery = $builder->callback
266-
? call_user_func($builder->callback, $builder, $this->searchConfig($builder->model))
266+
? call_user_func($builder->callback, $builder, $this->searchConfig($builder->model), $query)
267267
: $this->defaultQueryMethod($builder->query, $this->searchConfig($builder->model));
268268

269269
$query->crossJoin($this->database->raw($tsQuery->sql().' AS "tsquery"'));

0 commit comments

Comments
 (0)