fix: add missing hasTranslation method to AboutMe model

This commit is contained in:
DevOps committed 2026-06-28 17:41:38 +00:00
1 parent 223a4f5640
commit 1a75055dd9
1 file changed
+7 -1
+7 -1
View File
@@ -37,6 +37,12 @@ class AboutMe extends Model
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 @@ class AboutMe extends Model
return $this->translations['description'] ?? null;
}
}
}