Method |
Description |
|
__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 ) : Model |
|
|
getRelationKey ( ) : string |
|
|
getTranslation ( string | null $locale = null, boolean $withFallback = null ) : Model | null |
|
|
getTranslationModelName ( ) : string |
|
|
getTranslationModelNameDefault ( ) : string |
|
|
hasTranslation ( string | null $locale = null ) : boolean |
|
|
isTranslationAttribute ( string $key ) : boolean |
|
|
save ( array $options = [] ) : boolean |
|
|
scopeListsTranslations ( Builder $query, string $translationField ) |
Adds scope to get a list of translated attributes, using the current locale. |
|
scopeNotTranslatedIn ( Builder $query, string $locale = null ) : Builder | static |
|
|
scopeTranslated ( Builder $query ) : Builder | static |
|
|
scopeTranslatedIn ( Builder $query, string $locale = null ) : Builder | static |
|
|
scopeWhereTranslation ( Builder $query, string $key, string $value, string $locale = null ) : Builder | static |
This scope filters results by checking the translation fields. |
|
scopeWhereTranslationLike ( Builder $query, string $key, string $value, string $locale = null ) : Builder | static |
This scope filters results by checking the translation fields. |
|
scopeWithTranslation ( Builder $query ) |
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 ) : Model | null |
Alias for getTranslation(). |
|
translateOrDefault ( string $locale ) : Model | null |
Alias for getTranslation(). |
|
translateOrNew ( string $locale ) : Model | null |
Alias for getTranslationOrNew(). |
|
translations ( ) : Illuminate\Database\Eloquent\Relations\HasMany |
|
|