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

translation ilike #155

Closed
applyACS opened this issue Jun 11, 2020 · 2 comments
Closed

translation ilike #155

applyACS opened this issue Jun 11, 2020 · 2 comments
Assignees
Labels

Comments

@applyACS
Copy link

I want to be able to use 'ilike' for where translation.
Maybe have a method like 'whereTranslationLike' but using 'ilike'.
Did not see something like this in documentation

@Gummibeer Gummibeer self-assigned this Jun 11, 2020
@Gummibeer
Copy link
Member

Hey,
you can use the available scope builder method to create this scope by your own.

public function scopeWhereTranslationIlike(Builder $query, string $translationField, $value, ?string $locale = null)
{
    return $this->scopeWhereTranslation($query, $translationField, $value, $locale, 'whereHas', 'ILIKE');
}

Right now I prepare for v12 and it's not clear how the scopes will be kept - related to #129 . That's why I don't want to add this scope right now.

@stale
Copy link

stale bot commented Jun 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 25, 2020
@applyACS applyACS closed this as completed Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants