Skip to content

Commit

Permalink
Fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
CheesyTech authored and AlexVanderbist committed Oct 3, 2024
1 parent 2f77423 commit 31d04c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HasTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ public function tagsTranslated(string | null $locale = null): MorphToMany
->morphToMany(self::getTagClassName(), $this->getTaggableMorphName(), $this->getTaggableTableName())
->using($this->getPivotModelClassName())
->select('*')
->selectRaw($this->getQuery()->getGrammar()->wrap("name->>{$locale} as name_translated"))
->selectRaw($this->getQuery()->getGrammar()->wrap("slug->>{$locale} as slug_translated"))
->selectRaw($this->getQuery()->getGrammar()->wrap("name->{$locale} as name_translated"))
->selectRaw($this->getQuery()->getGrammar()->wrap("slug->{$locale} as slug_translated"))
->ordered();
}

Expand Down

0 comments on commit 31d04c7

Please sign in to comment.