Skip to content

Commit 0315c83

Browse files
committed
Separate name and slug
1 parent d4cba51 commit 0315c83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/HasTags.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public function tagsTranslated(string | null $locale = null): MorphToMany
7171
->morphToMany(self::getTagClassName(), $this->getTaggableMorphName(), $this->getTaggableTableName())
7272
->using($this->getPivotModelClassName())
7373
->select('*')
74-
->selectRaw($this->getQuery()->getGrammar()->wrap("name->>{$locale} as name_translated, slug->>{$locale} as slug_translated"))
74+
->selectRaw($this->getQuery()->getGrammar()->wrap("name->>{$locale} as name_translated"))
75+
->selectRaw($this->getQuery()->getGrammar()->wrap("slug->>{$locale} as slug_translated"))
7576
->ordered();
7677
}
7778

0 commit comments

Comments
 (0)