Filament: Real Estate Dynamic Filters Based on Other Filters

Filament allows us to build complex filter systems, so how about a Real Estate search? This example showcases the combined search for houses for sale and rent while hiding and displaying fields based on another filter.

FilamentExamples ThumbBase (17)

Get the Source Code:

How it works

The table has two custom filters. Custom filters are needed to use Form Builder to create custom-dependent deferred filters.

The filters are set to defer, the layout is set to AboveContent, and the filters form columns are set to three.

->filters([
// ...
], Tables\Enums\FiltersLayout::AboveContent)
->deferFilters()
->filtersFormColumns(3)

The first filter is to choose the type sale or rent.

Tables\Filters\Filter::make('type')
->form([
Forms\Components\Fieldset::make('Type')
->schema([
Forms\Components\Select::make('type')
->hiddenLabel()
->live()
->options([
'sale' => 'For Sale',
'rent' => 'For Rent',
]),
]),
// ...
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 51 Premium Examples for $99 Only Table Examples for $39