public static function root()
    {
        $url = request('REQUEST_URI', '', 'server');
        $root = request('DOCUMENT_ROOT', '', 'server');
        $scheme = request('REQUEST_SCHEME', '', 'server');
        $server = request('SERVER_NAME', '', 'server');

        $url = substr($url, 1);

        $parts = explode('/', $url);
        //
        $folder = '';
        //
        for ($i = 0; $i < count($parts); $i++) {
            if (File::isDirectory($root.$folder.$parts[$i].'/')) {
                $folder .= $parts[$i].'/';
            } else {
                break;
            }
        }

        return $scheme.'://'.$server.'/'.$folder;
    }