protected function getVendorAndFolderName($url)
    {
        if (Str::contains($url, '@')) {
            $vendorAndPackage = explode(':', $url);

            $vendorAndPackage = explode('/', $vendorAndPackage[1]);

            return [
                $vendorAndPackage[0],
                Str::replaceLast('.git', '', $vendorAndPackage[1]),
            ];
        }

        $urlParts = explode('/', $url);

        return [$urlParts[3], $urlParts[4]];
    }
protected function getVendorAndFolderName($url)
    {
        if (Str::contains($url, '@')) {
            $vendorAndPackage = explode(':', $url);

            $vendorAndPackage = explode('/', $vendorAndPackage[1]);

            return [
                $vendorAndPackage[0],
                Str::replaceLast('.git', '', $vendorAndPackage[1]),
            ];
        }

        $urlParts = explode('/', $url);

        return [$urlParts[3], $urlParts[4]];
    }
protected function getVendorAndFolderName ( $ url ) { if ( Str :: contains ( $ url , '@' ) ) { $ vendorAndPackage = explode ( ':' , $ url ) ; $ vendorAndPackage = explode ( '/' , $ vendorAndPackage [ 1 ] ) ; return [ $ vendorAndPackage [ 0 ] , Str :: replaceLast ( '.git' , '' , $ vendorAndPackage [ 1 ] ) , ] ; } $ urlParts = explode ( '/' , $ url ) ; return [ $ urlParts [ 3 ] , $ urlParts [ 4 ] ] ; }
Get vendor and package folder name.

@param $url

@return array
Get vendor and package folder name .