Wahba
Wahba
FFilament
Created by Wahba on 7/31/2024 in #❓┊help
Search records in an Attach Action
I actually managed to fix it by this way if anyone has the same issue:
->recordSelect(
fn (Select $select) => $select->getSearchResultsUsing(function(string $search): array {
return User::where('name', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray());
}),
)
->recordSelect(
fn (Select $select) => $select->getSearchResultsUsing(function(string $search): array {
return User::where('name', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray());
}),
)
4 replies