Get all default settings or default setting for single key if given.

@param string $key

@return \Illuminate\Support\Collection|mixed
970660
public function defaultSetting($key = null)
    {
        if (!is_null($key)) {
            return $this->settings()->getDefault($key);
        }

        return $this->settings()->allDefaults();
    }
1035496
public function get($key = null, $default = null)
    {
        if (!empty($key)) {
            return ArrayFunc::get($this->config, $key, $default);
        }

        return $this->config;
    }
1209080
public function getSettings($key, $default = null)
    {
        return Yii::$app->settings->get($key, $this->id, $default);
    }
1258453
private function getSetting($key)
    {
        $settings = $this->settingsHelper->getSettings('general');

        if (array_key_exists($key, $settings)) {
            return $settings[$key];
        }

        return null;
    }
1353874
public static function get($key = '')
    {
        if ($key === '') {
            return null;
        }

        $arr = explode('.', $key);

        $config_file = $arr[0];
        if (! isset(self::$settings[$config_file])) {
            self::addConfigFromFile($config_file);
        }

        $config_key_first = isset($arr[1]) ? $arr[1] : '';
        if ($config_key_first === '') {
            return null;
        }

        $value = isset(self::$settings[$config_file]->$config_key_first)
            ? self::$settings[$config_file]->$config_key_first : null;

        if (is_null($value)) {
            return null;
        }

        for ($i = 2; $i < count($arr); $i++) {
            $config_key = $arr[$i];
            if ($config_key == '') {
                return null;
            }
            $value = isset($value->$config_key) ? $value->$config_key : null;
            if (is_null($value)) {
                return null;
            }
        }

        return $value;
    }
1129307
public function get($key)
    {
        $setting = SettingModel::where('key', $key)->first();

        return $setting ? $setting->value : false;
    }
1337054
public function get($key, $default = null)
    {
        if (! $this->cache) {
            return $this->getNoCache($key, $default);
        }

        return Cache::rememberForever('settings-'.implode(',', (array) $key), function () use ($key, $default) {
            return $this->getNoCache($key, $default);
        });
    }
425122
public function getProfileConfig($key)
	{
		// If no profile setted load the config.php
		if (empty($this->_profile)) {
			return $this->_configs->get('bbcoder::profile.default.'.$key);
		}

		// Check if the profile overwrites the default config.
		if ($this->_configs->has('bbcoder::profile.'.$this->_profile.'.'.$key)) {
			return $this->_configs->get('bbcoder::profile.'.$this->_profile.'.'.$key);
		}

		return $this->_configs->get('bbcoder::profile.default.'.$key);
	}
217150
public function get(string $key,string $default=null)
  {
    $keys = explode('.',$key);
    $val = $this->confValues;

    for ($i=0; $i<count($keys); $i++) {
      $val = ( $val[ $keys[$i] ] ?? null);
      if (is_null($val)) break;
    }

    return $val ?? $default;
  }
429421
protected function findPreferenceByKey(string $key)
    {
        if (!$this->preferences && !$this->lazyLoad) {
            $this->preferences = $this->preferenceRepository->all();
        }

        if ($preference = $this->preferencesRegistry->get($key)) {
            return [
                'object' => $preference,
                'value'  => $this->preferences[$key] ?? $preference->default()
            ];
        }

        return null;
    }
774898
public function get(string $key, $default = null)
    {
        $result = $this->iterateConfig($key);

        return is_null($result) ? $default : $result;
    }
268690
public function get($key, $default = null)
    {
        /** @var SettingsInterface[] $providers */
        $providers = array_reverse($this->settingsProviders);
        foreach ($providers as $provider) {
            if (!is_null($setting = $provider->get($key, null))) {
                return $setting;
            }
        }
        return $default;
    }
416849
protected function getConfig($key, $default = null)
    {
        $config = $this->getApp()->make('config');

        return $config->get($key, $default);
    }
557441
private function get($key, $default = null)
    {
        if ( ! empty($this->config[$key])) {
            return $this->config[$key];
        }

        if (function_exists('config')) {
            if (null !== (config($key))) {
                return config($key);
            }
        }
        
        return $default;
    }
226830
public static function get($key, $default = null) {
        $value = Hash::get(static::$_config, $key);

        if ($value === null) {
            return $default;
        }

        return $value;
    }
390291
public function get($key, $default = null)
    {
        $pieces = explode('.', $key);
        $config = $this->config;

        foreach ($pieces as $piece) {
            if (!isset($config[$piece])) {
                return $default;
            }

            $config = $config[$piece];
        }

        return $config;
    }
115151
public function objectConfigGet($key, $default = null)
	{
		// Is this key exists?
		if (array_key_exists($key, $this->objectConfig)) {
			return $this->objectConfig[$key];
		}

		return $default;
	}