Refactor language filter to use conditional query builder
Removed redundant `whereIn` clause to simplify the query logic.
This commit is contained in:
parent
844264fb62
commit
8b35a5691f
@ -19,7 +19,6 @@ final readonly class ProjectTranslationServiceHashRepository
|
||||
$query = ProjectTranslationServiceHash::query()
|
||||
->where('morph_type', $morph)
|
||||
->where('morph_id', $morphId)
|
||||
->whereIn('language_id', $languages)
|
||||
->when($languages, function (Builder $query) use ($languages) {
|
||||
$query->whereIn('language_id', $languages);
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user