Property | Type | Description | |
---|---|---|---|
$rules | Validation rules | ||
$table | The database table used by the model. | ||
$timestamps |
Property | Type | Description | |
---|---|---|---|
$cacheByCode | Object cache of self, by code. | ||
$cacheListAvailable | A cache of available locales. | ||
$cacheListEnabled | A cache of enabled locales. |
Method | Description | |
---|---|---|
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 | ||
return | void |
public static findByCode ( string $code = null ) : Model | ||
$code | string | |
return | Model |
public static getDefault ( ) : self | ||
return | self |
public static isAvailable ( ) : boolean | ||
return | boolean |
public static listAvailable ( ) : array | ||
return | array |
public static listEnabled ( ) : array | ||
return | array |
public scopeIsEnabled ( Builder $query ) : Builder | ||
$query | Builder | |
return | Builder |
protected static $cacheByCode |
protected static $cacheListAvailable |
protected static $cacheListEnabled |