Property | Type | Description | |
---|---|---|---|
$cache | |||
$cachePrefix | |||
$setting |
Method | Description | |
---|---|---|
__construct ( |
SettingService constructor. | |
get ( $key, string | boolean $default = false ) : boolean | string | Gets a setting from the database, If not found, Returns default, Which is false by default. | |
has ( $key ) : boolean | Checks if a setting exists. | |
put ( $key, $value ) : boolean | Add a setting to the database. | |
remove ( $key ) : boolean | Removes a setting from the database. |
Method | Description | |
---|---|---|
clearFromCache ( $key ) | Clear an item from the cache completely. | |
formatValue ( $value, $default ) : mixed | Format a settings value | |
getOverrideValue ( $key ) : boolean | null | Returns an override value for a setting based on certain app conditions. | |
getSettingObjectByKey ( $key ) : mixed | Gets a setting model from the database for the given key. | |
getValueFromStore ( $key, $default ) : mixed | Gets a setting value from the cache or database. |
public __construct ( |
||
$setting | ||
$cache | Illuminate\Contracts\Cache\Repository |
protected clearFromCache ( $key ) | ||
$key |
protected formatValue ( $value, $default ) : mixed | ||
$value | ||
$default | ||
return | mixed |
protected getOverrideValue ( $key ) : boolean | null | ||
$key | ||
return | boolean | null |
protected getSettingObjectByKey ( $key ) : mixed | ||
$key | ||
return | mixed |
protected getValueFromStore ( $key, $default ) : mixed | ||
$key | ||
$default | ||
return | mixed |