Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downcase attribute and query for case-insensitive search #493

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

dwightwatson
Copy link
Contributor

A minor change to the collection engine that allows case-insensitive search by simply downcasing the attribute and query arguments before calling contains. Using the test data at the moment a search for a lowercase otwell wouldn't match either of you because your names are capitalised.

@driesvints
Copy link
Member

This isn't always wanted I think. A real-life situation of a search engine involves case sensitivity. For example: https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#case-sensitivity

We could indeed make an exception for the collection engine since it's more meant as a testing playground.

@taylorotwell taylorotwell merged commit 8c0b39a into laravel:9.x Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants