Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow case-insensitive search for translated models for postgres #2528

Merged
merged 2 commits into from
May 24, 2024

Conversation

zeezo887
Copy link
Collaborator

@zeezo887 zeezo887 commented Mar 7, 2024

Description

This PR overrides the scopeOrWhereTranslationLike method of astrotomic/laravel-translatable to select the like operator based on the database driver used.

public function scopeOrWhereTranslationLike(Builder $query, string $translationField, $value, ?string $locale = null): Builder
{
    return $this->scopeWhereTranslation($query, $translationField, $value, $locale, 'orWhereHas', getLikeOperator());
}

Related Issues

Fixes #2112

@ifox ifox merged commit 6eea37a into area17:3.x May 24, 2024
11 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMS search case sensitivity with translated models and Postgres
2 participants