From 73e94650f6a0425bf3914c520b1171b57dc72417 Mon Sep 17 00:00:00 2001 From: Nikita Koida Date: Thu, 4 Jul 2024 00:51:50 +0300 Subject: [PATCH] Fix query --- src/HasTags.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HasTags.php b/src/HasTags.php index a513103..a5b1076 100644 --- a/src/HasTags.php +++ b/src/HasTags.php @@ -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(); }