Skip to content

Commit

Permalink
Correction
Browse files Browse the repository at this point in the history
  • Loading branch information
NuwanJ committed Oct 17, 2024
1 parent 43fa4aa commit 2fdd0bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Domains/Taxonomy/Models/TaxonomyTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public static function getByTaxonomy($taxonomyId, $parent = null)

if ($parent == null) {
$res = TaxonomyTerm::where(function ($query) use ($taxonomyId) {
$query->whereNull('parent_id')->whereAnd('parent_id', $taxonomyId);
$query->whereNull('parent_id')->whereAnd('taxonomy_id', $taxonomyId);
});
} else {
$res = TaxonomyTerm::where(function ($query) use ($taxonomyId, $parent) {
$query->where('parent_id', $parent)->whereAnd('parent_id', $taxonomyId);
$query->where('parent_id', $parent)->whereAnd('taxonomy_id', $taxonomyId);
});
}

Expand Down

0 comments on commit 2fdd0bc

Please sign in to comment.