Troubleshooting $search variable accessibility in Select Field modifyQueryUsing() method
According to the document, the $search variable should be accessible within
https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
I tried adding $search in the
https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
Customizing the relationship query
You may customize the database query that retrieves options using the third parameter of therelationship()method:
If you would like to access the current search query in themodifyQueryUsingfunction, you can inject$search.
I tried adding $search in the
modifyQueryUsing but i got an errorAn attempt was made to evaluate a closure for [Filament\Forms\Components\Select], but [$search] was unresolvable.
$search parameter should be accessible inside the modifyQueryUsing() method, right? am i missing something or is this a bug?