public function format($root, $path, $route = null)
    {
        $path = '/'.trim($path, '/');

        if ($this->formatHostUsing) {
            $root = call_user_func($this->formatHostUsing, $root, $route);
        }

        if ($this->formatPathUsing) {
            $path = call_user_func($this->formatPathUsing, $path, $route);
        }

        return trim($root.$path, '/');
    }
public function format($root, $path, $route = null)
    {
        $path = '/'.trim($path, '/');

        if ($this->formatHostUsing) {
            $root = call_user_func($this->formatHostUsing, $root, $route);
        }

        if ($this->formatPathUsing) {
            $path = call_user_func($this->formatPathUsing, $path, $route);
        }

        return trim($root.$path, '/');
    }
public function format ( $ root , $ path , $ route = null ) { $ path = '/' . trim ( $ path , '/' ) ; if ( $ this -> formatHostUsing ) { $ root = call_user_func ( $ this -> formatHostUsing , $ root , $ route ) ; } if ( $ this -> formatPathUsing ) { $ path = call_user_func ( $ this -> formatPathUsing , $ path , $ route ) ; } return trim ( $ root . $ path , '/' ) ; }
Format the given URL segments into a single URL.

@param  string  $root
@param  string  $path
@param  \Illuminate\Routing\Route|null  $route
@return string
Format the given URL segments into a single URL .