Support Laravel Scout #1043
h-o-sein
started this conversation in
Feature Requests
Replies: 2 comments 3 replies
-
You could emit an event containing a list of IDs, and use that in the Builder function. Implementing Scout searching instead of the present method, to my mind would somewhat defeat the point / cleverness of this package. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can do this by extending the public function executeQuery()
{
if($searchTerm = $this->getSearch()){
$model = $this->builder()->getModel();
return $model::search($searchTerm, function(Indexes $index, $query, $options){
// $options['sort'] = ["received_at:desc"];
return $index->search($query, $options);
})->simplePaginate($this->getPerPage() === -1 ? $this->getBuilder()->count() : $this->getPerPage(), $this->getComputedPageName());
}
parent::executeQuery();
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
Please Support Laravel Scout on livewire-table
Beta Was this translation helpful? Give feedback.
All reactions