Class · extends AbstractKeyValuePair
An individual setting stored in the tblconfiguration table.
| Name | Description |
|---|---|
API_NG_API_WHITELIST_APPLY | |
API_NG_API_WHITELIST | |
API_DEBUG_MODE | |
TAX_VAT_AUTO_CONFIGURATION |
| Type | Name | Description |
|---|---|---|
| `` | $incrementing | Settings don't have an auto-incrementing key. |
| `` | $unique | 'setting' is a unique column. |
| `` | $guardedForUpdate | Once set, we cannot change a setting's 'setting' column. |
public static function boot()Load events around settings.
public static function allDefaults()Retrieve a collection of models that each have a default value assigned
Collection will only contain models for which a default is known (via $defaultKeyValuePairs property of the model class)
Returns \Illuminate\Database\Eloquent\Collection
public function scopeUpdater($query)Retrieve all updater settings.
Parameters
| Type | Name | Description |
|---|---|---|
\Illuminate\Database\Query\Builder | $query |
Returns \Illuminate\Database\Query\Builder
public static function updateRuntimeConfigCache($key, $value)public static function getValue($setting)Retrieve a WHMCS setting value by setting key name.
Return null if the setting isn't found.
Parameters
| Type | Name | Description |
|---|---|---|
string | $setting |
Returns string\|null
public static function setValue($key, $value)Set a configuration value.
Insert the new config setting if $key doesn't exist, otherwise update the existing $key.
Parameters
| Type | Name | Description |
|---|---|---|
string | $key | |
mixed | $value |
Returns Setting
public static function deleteValue($key)Delete a configuration value
Parameters
| Type | Name | Description |
|---|---|---|
string | $key |
public static function allAsArray()Retrieve all settings as a key value pair array.
Returns array
public function getBooleanValues()Return the setting names whose value should be boolean, but is stored as one of many boolean-ish strings
Returns \string[]
public function getCommaSeparatedValues()Return the setting names whose value should be an array, but is stored as a csv
Returns \string[]
public function newCollection(array $models = array())Get a collection of models
This overrides Eloquent's collection and returns one specific, and more powerful, to the context of Setting key/value data
Parameters
| Type | Name | Description |
|---|---|---|
array | $models |
Returns \Illuminate\Database\Eloquent\Collection\|SettingCollection