Level 4
Hey @ismaail do you found any solution to this problem?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
from the example in Filament documentation.
->filters([
Tables\Filters\SelectFilter::make('location')
->form([
Forms\Components\Select::make('city_id')
->options([1 => 'City A', 2 => 'City B'])
])
->indicateUsing(function(array $data, array $state) {
/*
Selected City in the Filter is "City A"
$data: array: ["city_id" => "1"]
$state: array:["city_id" => "1"]
*/
})
])
I can get the selected values with $data and $state variables.
But what I want is the name of the selected option: City A or City B
is there a way to get it without doing a query to database City::find(...) ?
Please or to participate in this conversation.