public static function get(string $key = null)
    {
        if (is_null($key)) {
            return static::$config;
        }
        // Key is formatted like database.default.driver
        $config = static::$config;
        $key = explode('.', $key);
        foreach ($key as $k) {
            if (!isset($config[$k])) {
                return null;
            }
            $config = $config[$k];
        }
        return $config;
    }
public static function get(string $key = null)
    {
        if (is_null($key)) {
            return static::$config;
        }
        // Key is formatted like database.default.driver
        $config = static::$config;
        $key = explode('.', $key);
        foreach ($key as $k) {
            if (!isset($config[$k])) {
                return null;
            }
            $config = $config[$k];
        }
        return $config;
    }
public static function get ( string $ key = null ) { if ( is_null ( $ key ) ) { return static :: $ config ; } // Key is formatted like database.default.driver $ config = static :: $ config ; $ key = explode ( '.' , $ key ) ; foreach ( $ key as $ k ) { if ( ! isset ( $ config [ $ k ] ) ) { return null ; } $ config = $ config [ $ k ] ; } return $ config ; }
Get the value of a configuration key
@param string|null $key Name of the key you want value of, leave empty to retrieve all,
multidimensional keys are formatted like: key.subkey.subsubkey.something
@return array|mixed|null Retrieve values or null if key doesn't exist
@since 1.0.0
Get the value of a configuration key