From 8b35a5691f152282bf480a4426a1c84894dc0fef Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Wed, 12 Feb 2025 21:38:52 +0500 Subject: [PATCH] Refactor language filter to use conditional query builder Removed redundant `whereIn` clause to simplify the query logic. --- .../app/Repositories/ProjectTranslationServiceHashRepository.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/application/app/Repositories/ProjectTranslationServiceHashRepository.php b/app/application/app/Repositories/ProjectTranslationServiceHashRepository.php index 2513031..a2fab26 100644 --- a/app/application/app/Repositories/ProjectTranslationServiceHashRepository.php +++ b/app/application/app/Repositories/ProjectTranslationServiceHashRepository.php @@ -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); })