Property | Type | Description | |
---|---|---|---|
$config | Illuminate\Config\Repository | @var Config | |
$defaultAvailableLocales | string | @var string | |
$defaultLocale | string | @var string | |
$errors | Illuminate\Support\MessageBag | @var \Illuminate\Support\MessageBag | |
$model | Waavi\Translation\Models\Language | The model being queried. | |
$validator | Illuminate\Validation\Validator | @var \Illuminate\Validation\Validator |
Method | Description | |
---|---|---|
__construct ( Waavi\Translation\Models\Language $model, Illuminate\Foundation\Application $app ) : void | Constructor | |
allExcept ( $locale ) : Waavi\Translation\Models\Language | null | Find all Languages except the one with the specified locale. | |
availableLocales ( ) : array | Returns a list of all available locales. | |
create ( array $attributes ) : boolean | Insert a new language entry into the database. | |
findByLocale ( $locale ) : Waavi\Translation\Models\Language | null | Find a Language by its locale | |
findTrashedByLocale ( $locale ) : Waavi\Translation\Models\Language | null | Find a deleted Language by its locale | |
isValidLocale ( $locale ) : boolean | Checks if a language with the given locale exists. | |
percentTranslated ( string $locale ) : integer | Compute percentage translate of the given language. | |
update ( array $attributes ) : boolean | Insert a new language entry into the database. | |
validate ( array $attributes ) : boolean | Validate the given attributes | |
validationErrors ( ) : Illuminate\Support\MessageBag | Returns the validations errors of the last action executed. |
public __construct ( Waavi\Translation\Models\Language $model, Illuminate\Foundation\Application $app ) : void | ||
$model | Waavi\Translation\Models\Language | |
$app | Illuminate\Foundation\Application | |
return | void |
public findByLocale ( $locale ) : Waavi\Translation\Models\Language | null | ||
return | Waavi\Translation\Models\Language | null |
public findTrashedByLocale ( $locale ) : Waavi\Translation\Models\Language | null | ||
return | Waavi\Translation\Models\Language | null |
public isValidLocale ( $locale ) : boolean | ||
return | boolean |
public percentTranslated ( string $locale ) : integer | ||
$locale | string | |
return | integer |
public validationErrors ( ) : Illuminate\Support\MessageBag | ||
return | Illuminate\Support\MessageBag |
protected Repository,Illuminate\Config $config | ||
return | Illuminate\Config\Repository |
protected string $defaultAvailableLocales | ||
return | string |
protected MessageBag,Illuminate\Support $errors | ||
return | Illuminate\Support\MessageBag |
protected Language,Waavi\Translation\Models $model | ||
return | Waavi\Translation\Models\Language |