*/
protected function getValueFromStore($key, $default)
{
- // Check for an overriding value
- $overrideValue = $this->getOverrideValue($key);
- if ($overrideValue !== null) {
- return $overrideValue;
- }
-
// Check the cache
$cacheKey = $this->cachePrefix . $key;
$cacheVal = $this->cache->get($cacheKey, null);
{
return $this->setting->where('setting_key', '=', $key)->first();
}
-
-
- /**
- * Returns an override value for a setting based on certain app conditions.
- * Used where certain configuration options overrule others.
- * Returns null if no override value is available.
- * @param $key
- * @return bool|null
- */
- protected function getOverrideValue($key)
- {
- if ($key === 'registration-enabled' && config('auth.method') === 'ldap') {
- return false;
- }
- return null;
- }
}