src/UrlHelper.php
public function joinSlugs(array $urlParts)
    {
        $urlParts = array_map(function($urlPart){
            return trim($urlPart, '/');
        }, $urlParts);

        return implode('/', $urlParts);
    }
public function joinSlugs(array $urlParts)
    {
        $urlParts = array_map(function($urlPart){
            return trim($urlPart, '/');
        }, $urlParts);

        return implode('/', $urlParts);
    }
public function joinSlugs ( array $ urlParts ) { $ urlParts = array_map ( function ( $ urlPart ) { return trim ( $ urlPart , '/' ) ; } , $ urlParts ) ; return implode ( '/' , $ urlParts ) ; }
Join URL parts without double slashes

@param array $urlParts

@return string
Join URL parts without double slashes