1 | <?php |
||
8 | class LanguageLine extends Model |
||
9 | { |
||
10 | /** @var array */ |
||
11 | public $translatable = ['text']; |
||
12 | |||
13 | /** @var array */ |
||
14 | public $guarded = ['id']; |
||
15 | |||
16 | /** @var array */ |
||
17 | protected $casts = ['text' => 'array']; |
||
18 | |||
19 | public static function boot() |
||
30 | |||
31 | public static function getTranslationsForGroup(string $locale, string $group): array |
||
44 | |||
45 | public static function getCacheKey(string $group, string $locale): string |
||
49 | |||
50 | /** |
||
51 | * @param string $locale |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getTranslation(string $locale): string |
||
66 | |||
67 | /** |
||
68 | * @param string $locale |
||
69 | * @param string $value |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | public function setTranslation(string $locale, string $value) |
||
79 | |||
80 | protected function flushGroupCache() |
||
86 | |||
87 | protected function getTranslatedLocales(): array |
||
91 | } |
||
92 |