Filters
Text, select, catalog, multiple choice with any/all and date ranges – each filter is one line plus the query it applies.
- Selects reload the list at once, text fields while typing.
- "Tags" offers a choice between any and all of the chosen tags.
Try it: log in with the demo account
Email demo@frontdesk-demo.test · Password Try-Frontdesk-2026
Everyone shares this account. You may change anything – all data is reset every night.
The code
app/src/Controllers/ProjectController.php – defineFilters()
whole file
protected function defineFilters(): FilterCollection
{
return FilterCollection::create()
->add(TextFilter::create('Query', 'Search')
->apply(fn (DataList $list, $value) => $list->filterAny([
'Title:PartialMatch' => $value,
'Client.Name:PartialMatch' => $value,
'Description:PartialMatch' => $value,
])))
->add(SelectFilter::create('Status', 'Status')
->options(Project::STATUSES)
->apply(fn (DataList $list, $value) => $list->filter('Status', $value)))
->add(CatalogFilter::create('Type', 'Type', 'project_type'))
->add(MultiSelectFilter::create('Tags', 'Tags')
->options(fn () => Catalogs::singleton()->options(Catalogs::singleton()->all('tags')))
->field('Tags.ID')
->choosableMatch())
->add(SelectFilter::create('Manager', 'Manager')
->options(fn () => $this->managerOptions())
->apply(fn (DataList $list, $value) => $list->filter('ManagerID', (int) $value)))
->add(DateRangeFilter::create('Start', 'Starts between')
->apply(function (DataList $list, array $range) {
if ($range['from']) {
$list = $list->filter('StartDate:GreaterThanOrEqual', $range['from']);
}
if ($range['to']) {
$list = $list->filter('StartDate:LessThanOrEqual', $range['to']);
}
return $list;
}));
}