public function config($key = null, $default = null)
    {
        if ($this->config === null) {
            $this->config = $this->createConfig();
        }

        if ($key !== null) {
            if ($this->config->has($key)) {
                return $this->config->get($key);
            } elseif (!is_string($default) && is_callable($default)) {
                return $default();
            } else {
                return $default;
            }
        }

        return $this->config;
    }