fix: add missing hasTranslation method to AboutMe model
Deploy Backend / deploy (push) Successful in 3m19s
Deploy Backend / deploy (push) Successful in 3m19s
This commit is contained in:
1 parent
9f7619146f
commit
4df456b9d5
1 file changed
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user