src/Services/NestableService.php
protected function url($path, $label, $parent = null)
    {
        if ($this->config['generate_url']) {
            if ($this->route) {
                if (array_has($this->route, 'callback')) {
                    if(is_array($parent)) $parent = (object)$parent;
                    return call_user_func_array($this->route['callback'], [$path, $label, $parent]);
                } else {
                    end($this->route);
                    $param = current($this->route);
                    $name = key($this->route);
                    return URL::route($name, [$param => $path]);
                }
            }

            return URL::to($path);
        }

        return '/'.$path;
    }
protected function url($path, $label, $parent = null)
    {
        if ($this->config['generate_url']) {
            if ($this->route) {
                if (array_has($this->route, 'callback')) {
                    if(is_array($parent)) $parent = (object)$parent;
                    return call_user_func_array($this->route['callback'], [$path, $label, $parent]);
                } else {
                    end($this->route);
                    $param = current($this->route);
                    $name = key($this->route);
                    return URL::route($name, [$param => $path]);
                }
            }

            return URL::to($path);
        }

        return '/'.$path;
    }
protected function url ( $ path , $ label , $ parent = null ) { if ( $ this -> config [ 'generate_url' ] ) { if ( $ this -> route ) { if ( array_has ( $ this -> route , 'callback' ) ) { if ( is_array ( $ parent ) ) $ parent = ( object ) $ parent ; return call_user_func_array ( $ this -> route [ 'callback' ] , [ $ path , $ label , $ parent ] ) ; } else { end ( $ this -> route ) ; $ param = current ( $ this -> route ) ; $ name = key ( $ this -> route ) ; return URL :: route ( $ name , [ $ param => $ path ] ) ; } } return URL :: to ( $ path ) ; } return '/' . $ path ; }
URL Generator.

@param string $path

@return string
URL Generator .