Метод | Описание | |
---|---|---|
__isset ( $key ) : boolean | ||
deleteTranslations ( string | array | null $locales = null ) | Deletes all translations for this model. | |
fill ( array $attributes ) | ||
getAttribute ( string $key ) : mixed | ||
getLocaleKey ( ) : string | ||
getNewTranslation ( string $locale ) : |
||
getRelationKey ( ) : string | ||
getTranslation ( string | null $locale = null, boolean $withFallback = null ) : |
||
getTranslationModelName ( ) : string | ||
getTranslationModelNameDefault ( ) : string | ||
hasTranslation ( string | null $locale = null ) : boolean | ||
isTranslationAttribute ( string $key ) : boolean | ||
save ( array $options = [] ) : boolean | ||
scopeListsTranslations ( |
Adds scope to get a list of translated attributes, using the current locale. | |
scopeNotTranslatedIn ( |
||
scopeTranslated ( |
||
scopeTranslatedIn ( |
||
scopeWhereTranslation ( |
This scope filters results by checking the translation fields. | |
scopeWhereTranslationLike ( |
This scope filters results by checking the translation fields. | |
scopeWithTranslation ( |
This scope eager loads the translations for the default and the fallback locale only. | |
setAttribute ( string $key, mixed $value ) | ||
toArray ( ) : array | ||
translate ( string | null $locale = null, boolean $withFallback = false ) : |
Alias for getTranslation(). | |
translateOrDefault ( string $locale ) : |
Alias for getTranslation(). | |
translateOrNew ( string $locale ) : |
Alias for getTranslationOrNew(). | |
translations ( ) : Illuminate\Database\Eloquent\Relations\HasMany |
Метод | Описание | |
---|---|---|
getLocaleSeparator ( ) : string | ||
getLocales ( ) : array | ||
getTranslationOrNew ( string $locale ) : |
||
isKeyALocale ( string $key ) : boolean | ||
isTranslationDirty ( |
||
locale ( ) : string | ||
saveTranslations ( ) : boolean |
Метод | Описание | |
---|---|---|
alwaysFillable ( ) : boolean | ||
getFallbackLocale ( null $locale = null ) : string | ||
getLanguageFromCountryBasedLocale ( $locale ) : string | ||
getTranslationByLocaleKey ( string $key ) | ||
getTranslationsTable ( ) : string | ||
isLocaleCountryBased ( $locale ) : boolean | ||
useFallback ( ) : boolean | null |
public getAttribute ( string $key ) : mixed | ||
$key | string | |
Результат | mixed |
public getNewTranslation ( string $locale ) : |
||
$locale | string | |
Результат |
public getTranslationModelName ( ) : string | ||
Результат | string |
public getTranslationModelNameDefault ( ) : string | ||
Результат | string |
protected getTranslationOrNew ( string $locale ) : |
||
$locale | string | |
Результат |
protected isKeyALocale ( string $key ) : boolean | ||
$key | string | |
Результат | boolean |
public isTranslationAttribute ( string $key ) : boolean | ||
$key | string | |
Результат | boolean |
protected isTranslationDirty ( |
||
$translation | ||
Результат | boolean |
public scopeListsTranslations ( |
||
$query | ||
$translationField | string |
public scopeNotTranslatedIn ( |
||
$query | ||
$locale | string | |
Результат |
public scopeTranslated ( |
||
$query | ||
Результат |
public scopeTranslatedIn ( |
||
$query | ||
$locale | string | |
Результат |
public scopeWithTranslation ( |
||
$query |
public setAttribute ( string $key, mixed $value ) | ||
$key | string | |
$value | mixed |
public translateOrDefault ( string $locale ) : |
||
$locale | string | |
Результат |
public translateOrNew ( string $locale ) : |
||
$locale | string | |
Результат |
public translations ( ) : Illuminate\Database\Eloquent\Relations\HasMany | ||
Результат | Illuminate\Database\Eloquent\Relations\HasMany |