public function config($key, $default = null)
    {
        $parts = explode('.', $key);

        $filename = head($parts);

        $parts = array_slice($parts, 0);

        $path = $this->path . "/config/config.php";

        if (! file_exists($path)) {
            $path = $this->path . "/config/{$filename}.php";
        }

        $key = implode('.', $parts);

        $config = file_exists($path) ? require $path : [];

        return array_get($config, $key, $default);
    }
public function config($key, $default = null)
    {
        $parts = explode('.', $key);

        $filename = head($parts);

        $parts = array_slice($parts, 0);

        $path = $this->path . "/config/config.php";

        if (! file_exists($path)) {
            $path = $this->path . "/config/{$filename}.php";
        }

        $key = implode('.', $parts);

        $config = file_exists($path) ? require $path : [];

        return array_get($config, $key, $default);
    }
public function config ( $ key , $ default = null ) { $ parts = explode ( '.' , $ key ) ; $ filename = head ( $ parts ) ; $ parts = array_slice ( $ parts , 0 ) ; $ path = $ this -> path . "/config/config.php" ; if ( ! file_exists ( $ path ) ) { $ path = $ this -> path . "/config/{$filename}.php" ; } $ key = implode ( '.' , $ parts ) ; $ config = file_exists ( $ path ) ? require $ path : [ ] ; return array_get ( $ config , $ key , $ default ) ; }
Get theme's config value.

@param  string $key
@param  string|null $default
@return string|null
Get theme s config value .