@@ -107,6 +107,9 @@ discard block |
||
| 107 | 107 | return parent::fill($attributes); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | + /** |
|
| 111 | + * @param string $key |
|
| 112 | + */ |
|
| 110 | 113 | public function getAttribute($key) |
| 111 | 114 | { |
| 112 | 115 | list($attribute, $locale) = $this->getAttributeAndLocale($key); |
@@ -386,6 +389,10 @@ discard block |
||
| 386 | 389 | ]); |
| 387 | 390 | } |
| 388 | 391 | |
| 392 | + /** |
|
| 393 | + * @param string $key |
|
| 394 | + * @param string $value |
|
| 395 | + */ |
|
| 389 | 396 | public function setAttribute($key, $value) |
| 390 | 397 | { |
| 391 | 398 | list($attribute, $locale) = $this->getAttributeAndLocale($key); |
@@ -399,6 +406,9 @@ discard block |
||
| 399 | 406 | return $this; |
| 400 | 407 | } |
| 401 | 408 | |
| 409 | + /** |
|
| 410 | + * @param string|null $locale |
|
| 411 | + */ |
|
| 402 | 412 | public function setDefaultLocale(?string $locale) |
| 403 | 413 | { |
| 404 | 414 | $this->defaultLocale = $locale; |
@@ -406,6 +416,9 @@ discard block |
||
| 406 | 416 | return $this; |
| 407 | 417 | } |
| 408 | 418 | |
| 419 | + /** |
|
| 420 | + * @param string $locale |
|
| 421 | + */ |
|
| 409 | 422 | public function translate(?string $locale = null, bool $withFallback = false): ?Model |
| 410 | 423 | { |
| 411 | 424 | return $this->getTranslation($locale, $withFallback); |