Свойство | Тип | Описание | |
---|---|---|---|
$rules | Validation rules | ||
$table | The database table used by the model. | ||
$timestamps |
Свойство | Тип | Описание | |
---|---|---|---|
$cacheByCode | Object cache of self, by code. | ||
$cacheListAvailable | A cache of available locales. | ||
$cacheListEnabled | A cache of enabled locales. |
Метод | Описание | |
---|---|---|
afterCreate ( ) | ||
beforeDelete ( ) | ||
beforeUpdate ( ) | ||
clearCache ( ) : void | Clears all cache keys used by this model | |
findByCode ( string $code = null ) : Model | Locate a locale table by its code, cached. | |
getDefault ( ) : self | Returns the default locale defined. | |
isAvailable ( ) : boolean | Returns true if there are at least 2 locales available. | |
isValid ( $locale ) : boolean | Returns true if the supplied locale is valid. | |
listAvailable ( ) : array | Lists available locales, used on the back-end. | |
listEnabled ( ) : array | Lists the enabled locales, used on the front-end. | |
makeDefault ( ) : void | Makes this model the default | |
scopeIsEnabled ( Builder $query ) : Builder | Scope for checking if model is enabled |
public static clearCache ( ) : void | ||
Результат | void |
public static findByCode ( string $code = null ) : Model | ||
$code | string | |
Результат | Model |
public static getDefault ( ) : self | ||
Результат | self |
public static isAvailable ( ) : boolean | ||
Результат | boolean |
public static listAvailable ( ) : array | ||
Результат | array |
public static listEnabled ( ) : array | ||
Результат | array |
public makeDefault ( ) : void | ||
Результат | void |
public scopeIsEnabled ( Builder $query ) : Builder | ||
$query | Builder | |
Результат | Builder |
protected static $cacheByCode |
protected static $cacheListAvailable |
protected static $cacheListEnabled |