Multiple search terms
Hi - Is there a way to 'OR' the search terms for a single column ie A2 or A3 value in a field?
8 Replies
You can create a filter that has a disjunction OR option. For example
https://demo.filamentphp.com/shop/products/products
you have the code on github
@adnn I don't see a Product Resource in the github repo that matches the demo.
@Leandro Ferreira Not really - I want to put more than one search term into the search box and have it perform an 'OR' on a single column ie If the name field contains 'Bill' OR 'John'. I guess I can write my own filter and get the terms inside of an input field in the filter form ...
hum.. a custom filter I guess
Everything on that site is in the github demo repo, including a working OR filter
@adnn could you paste a link to the repo? The one I am looking at does not have a ProductResource. This is the repo linked from the demo site.
Clusters folder. https://github.com/filamentphp/demo/blob/main/app/Filament/Clusters/Products/Resources/ProductResource.php
It is a QueryBuilder filter
https://filamentphp.com/docs/3.x/tables/filters/query-builder#overview
GitHub
demo/app/Filament/Clusters/Products/Resources/ProductResource.php a...
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
@Leandro Ferreira Thanks I will look at that. π