Global Search & Laravel Scout
Hey. I've managed to get the individual tables to work with Scout, but I am unsure how to integrate and use it to scope the global search. Any example and help is appreciated.
4 Replies
add
protected static ?string $recordTitleAttribute = 'title';
for more:
https://filamentphp.com/docs/3.x/panels/resources/global-searchThanks! I did that, but that enables global search which is great, but I need to make it search within the results scoped by Laravel Scout. It works for tables, but I don't see an example on how to do the same for global.
Hey i also want to know how you did that i am trying but got no result
i have followed this https://filamentphp.com/docs/2.x/tables/getting-started#searching-records-with-laravel-scout
and placed the things in my resources
but nothing is happening
Any idea ?
It works for my situation.
I'm using Laravel Scout with Algolia, I found this plugin that helps me with my solution.
https://github.com/fatm-dev/filament-meilisearch-implement
I was taking a look at globalSearch function from PanelProvider.
We can pass a specific GlobalSearch Provider, so I override the default using Model::search using GlobalSearchProvider interface.
Panel Provider: