Свойство | Тип | Описание | |
---|---|---|---|
$cache | array | The translations cache. |
Метод | Описание | |
---|---|---|
getAttribute ( string $key ) : mixed | Get an attribute from the model or translation. | |
getDirtyTranslations ( ) : array | Get the translatable attributes that have been changed since last sync. | |
isDirty ( array | string | null $attributes = null ) : boolean | Determine if the model or given attribute(s) have been modified. | |
setAttribute ( string $key, mixed $value ) | Set a given attribute on the model or translation. | |
translate ( string $locale = null, boolean $fallback = true ) : |
Get a translation. | |
translations ( ) : Illuminate\Database\Eloquent\Relations\HasMany | Get the translations relation. |
Метод | Описание | |
---|---|---|
finishSave ( array $options ) : void | Finish processing on a successful save operation. | |
getEmptyTranslation ( string $locale ) : |
Get an empty translation. | |
getFallback ( ) : string | Get the fallback locale. | |
getLocale ( ) : string | Get the current locale. | |
getTranslatable ( ) : array | Get the translatable attributes array. | |
getTranslation ( string $locale ) : |
Get a translation. | |
setLocale ( string $locale ) : void | Set the locale. | |
translateOrNew ( string $locale ) : |
Get a translation or create new. |
protected finishSave ( array $options ) : void | ||
$options | array | |
Результат | void |
public getAttribute ( string $key ) : mixed | ||
$key | string | |
Результат | mixed |
public getDirtyTranslations ( ) : array | ||
Результат | array |
protected getEmptyTranslation ( string $locale ) : |
||
$locale | string | |
Результат |
protected getFallback ( ) : string | ||
Результат | string |
protected getTranslatable ( ) : array | ||
Результат | array |
protected getTranslation ( string $locale ) : |
||
$locale | string | |
Результат |
public setAttribute ( string $key, mixed $value ) | ||
$key | string | |
$value | mixed |
protected translateOrNew ( string $locale ) : |
||
$locale | string | |
Результат |
abstract public translations ( ) : Illuminate\Database\Eloquent\Relations\HasMany | ||
Результат | Illuminate\Database\Eloquent\Relations\HasMany |