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 | protected $casts = ['text' => 'array']; |
||
17 | |||
18 | public static function boot() |
||
28 | |||
29 | public static function getTranslationsForGroup(string $locale, string $group): array |
||
45 | |||
46 | public static function getCacheKey(string $group, string $locale): string |
||
50 | |||
51 | /** |
||
52 | * @param string $locale |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getTranslation(string $locale): string |
||
60 | |||
61 | /** |
||
62 | * @param string $locale |
||
63 | * @param string $value |
||
64 | */ |
||
65 | public function setTranslation(string $locale, string $value) |
||
69 | |||
70 | protected function flushGroupCache() |
||
76 | |||
77 | protected function getTranslatedLocales(): array |
||
81 | } |
||
82 |