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

Use whereLike for case-insensitive search #2924

Merged
merged 2 commits into from
Nov 23, 2024
Merged

Use whereLike for case-insensitive search #2924

merged 2 commits into from
Nov 23, 2024

Conversation

tabuna
Copy link
Member

@tabuna tabuna commented Nov 23, 2024

This updates search functionality to use the whereLike method, introduced in Laravel v11.17.0, for performing case-insensitive searches. For Laravel versions below 11.17.0, the existing implementation using like is retained.

The whereLike method adapts to the specifics of different databases:

  • PostgreSQL: Uses ilike for case-insensitive search.
  • MySQL: Uses like.
  • SQLite: Uses like.
  • SQL Server: Behavior depends on the column/database collation.

@tabuna tabuna merged commit 8b846d9 into master Nov 23, 2024
1 check failed
@tabuna tabuna deleted the relation-like branch November 23, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant