Метод |
Описание |
|
attributesToArray ( ) : array |
Extend parent's attributesToArray so that _translation attributes do not appear in array, and translatable attributes are translated. |
|
bootTranslatable ( ) : void |
Register Model observer. |
|
getAttribute ( $attribute ) : mixed |
Hijack parent's getAttribute to get the translation of the given field instead of its value. |
|
getRawAttribute ( $attribute ) |
|
|
isTranslatable ( $attribute ) : boolean |
Check if an attribute is translatable. |
|
isTranslated ( string $attribute ) : boolean |
Check if a translation exists for the given attribute. |
|
rawValueRequested ( string $attribute ) : boolean |
Check if the attribute being queried is the raw value of a translatable attribute. |
|
setAttribute ( string $attribute, string $value ) : void |
Hijack Eloquent's setAttribute to create a Language Entry, or update the existing one, when setting the value of this attribute. |
|
translatableAttributes ( ) : array |
Return the translatable attributes array |
|
translate ( string $attribute ) : Translation |
Return the translation related to a translatable attribute. |
|
translationCodeFor ( string $attribute ) : string |
Get the set translation code for the give attribute |
|