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

Added whereLocale and whereLocales methods #370

Merged
merged 5 commits into from
Dec 23, 2022
Merged

Added whereLocale and whereLocales methods #370

merged 5 commits into from
Dec 23, 2022

Conversation

ahmetbarut
Copy link
Contributor

In some cases, there are times when I want to extract content according to the user's locale, and in this case, I found these solutions instead of constantly writing queries.

whereLocale and whereLocales methods.

$post->whereLocale('title', 'en')->get();

// or mutliple locales
$post->whereLocales('title', ['en', 'fr'])->get();

@freekmurze
Copy link
Member

Thanks, could you also mention these in the readme with a good example.

@ahmetbarut
Copy link
Contributor Author

@freekmurze I have attached documentation for both this pull request and the previous pull request

@freekmurze freekmurze merged commit e001426 into spatie:main Dec 23, 2022
@freekmurze
Copy link
Member

Thanks!

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