From 1a75055dd94e08f93b13ff5aa8c2324f56ccde92 Mon Sep 17 00:00:00 2001 From: DevOps Date: Sun, 28 Jun 2026 17:41:38 +0000 Subject: [PATCH] fix: add missing hasTranslation method to AboutMe model --- app/Models/Website/AboutMe.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Models/Website/AboutMe.php b/app/Models/Website/AboutMe.php index c31f55c..c07d7c6 100644 --- a/app/Models/Website/AboutMe.php +++ b/app/Models/Website/AboutMe.php @@ -37,6 +37,12 @@ public function getTranslation(string $key, string $locale, bool $useFallbackLoc return null; } + public function hasTranslation(string $key, string $locale): bool + { + $translations = $this->translations; + return isset($translations[$key][$locale]); + } + public function getTitleAttribute() { return $this->translations['title'] ?? null; @@ -47,4 +53,4 @@ public function getDescriptionAttribute() return $this->translations['description'] ?? null; } -} +} \ No newline at end of file