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
Customizing the relationship query You may customize the database query that retrieves options using the third parameter of theI tried adding $search in therelationship()
method: If you would like to access the current search query in themodifyQueryUsing
function, you can inject$search
.
modifyQueryUsing
but i got an error
An 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?0 Replies