How can I get the state of text written inside the select search bar?

In the picture, type to search. I want the state of the written text inside of the search bar. Can anyone help me with that?
No description
1 Reply
RawaN
RawaN4w ago
can you try something like this
->getSearchResultsUsing(function (string $search) {
$results = Item::where('item', 'like', "%{$search}%")
->limit(50)
->pluck('item', 'item')
->toArray();
$results[$search] = $search;
return $results;
})
->getSearchResultsUsing(function (string $search) {
$results = Item::where('item', 'like', "%{$search}%")
->limit(50)
->pluck('item', 'item')
->toArray();
$results[$search] = $search;
return $results;
})
Want results from more Discord servers?
Add your server