Get the url from db
If true given, we generate a new one,
This us usefull if parent_id updated, etc

@return \Eloquent
514100
public function updateUrl($model)
    {
        $this->url = '';
        $this->generateCompleteUrl($model);

        if (strlen($this->slug) > 1) {
            $this->url .= (strlen($this->url) > 1 ? '/' : '') . $this->slug;
        }

        // prefix the sport type and news - 'complete url'
        $this->url = $this->getURLPrefix() . $this->url . $this->getURLPosfix();

        return $this;
    }
792146
public function URL()
    {
        $p = $this->parse();
        $link = '';

        $link .= (!empty($p['scheme'])) ? $p['scheme'] . '://' : false;
        $link .= (!empty($p['user'])) ? $p['user'] . ':' : false;
        $link .= (!empty($p['pass'])) ? $p['pass'] . '@' : false;
        $link .= (!empty($p['host'])) ? $p['host'] : false;
        $link .= (!empty($p['path'])) ? $p['path'] : false;
        if (!empty($p['query'])) {
            parse_str($p['query'], $get_array);
            $link .= '?' . http_build_query($get_array, '', '&amp;');
        }
        $link .= (!empty($p['fragment'])) ? '#' . $p['fragment'] : false;

        return $link;
    }
23604
public function url()
    {
        if ($this->{self::ATTR_PRIMARY_URI} === null) {
            return;
        }

        if ($this->primaryUrl === null) {
            $this->primaryUrl = new URL([
                'page'       => $this,
                'location'   => $this->{self::ATTR_PRIMARY_URI},
                'is_primary' => true,
            ]);
        }

        return $this->primaryUrl;
    }
287386
public function get()
    {
        $path = $this->getView()->getParam('this.permalink');
        $params = $this->getView()->getParams();
        $permalink = $this->getView()->getParam('this.permalink', null);

        $params = array_merge($params['site'], $params['page']);
        foreach ($params as $name => $param) {
            // apply only scalar params
            if (is_scalar($param)) {
                $path = str_replace(':' . $name, $this->normalize($param), $path);
            }
        }

        $path = rtrim($this->getView()->getOutputDir(), '/') . '/'
              . ltrim($path, '/');

        if (substr($path, -1) === '/') {
            $path .= 'index.html';
        } else if (is_null($permalink) && substr($path, -5) !== '.html') {
            $path .= '.html';
        }

        return $path;
    }
873421
public function getCreateUrl()
    {
        $queryString = '';

        if ($constraints = $this->model()->getConstraints()) {
            $queryString = http_build_query($constraints);
        }

        return sprintf('%s/create%s',
            $this->resource(),
            $queryString ? ('?'.$queryString) : ''
        );
    }
1006637
public function getURLQuery()
    {
        $qstr = '?';

        $params = $this->getParametersArray();

        $paramCount = count($params);
        $i = 0;
        foreach ($params as $key => $value) {
            if ($value === null) {
                continue;
            }

            $qstr .= $key . '=' . rawurlencode($value);

            if ($i < $paramCount - 1) {
                $qstr .= '&';
            }

            $i++;
        }

        return $qstr;
    }
607485
public function objectEditUrl()
    {
        $model = $this->proto();
        $url   = 'object/edit?main_menu={{ main_menu }}&obj_type='.$this->objType();

        if ($model->view()) {
            $url = $model->render((string)$url);
        } else {
            $url = preg_replace('~{{\s*id\s*}}~', $this->currentObjId, $url);
        }

        return $url;
    }
751107
public function url()
    {
        $dirname = $this->parent->url();

        if ($this->parent instanceof Root) { //at root

            return $dirname.$this->basename();
        }

        return sprintf('%s/%s', $dirname, $this->basename());

    }
309231
protected function getUrl()
    {
        $url = $this->path['url'];

        $uri    = is_array($url) ? $url[0] : $url;
        $params = is_array($url) ? array_slice($url, 1) : null;

        if (Utils::isAbsoluteUrl($uri)) {
            return $uri;
        }

        return url($uri, $params);
    }
39552
public function get_url() {
        if (!empty($this->data['other']['wid'])) {
            return new \moodle_url('/mod/wiki/view.php', array('wid' => $this->data['other']['wid'],
                    'title' => $this->data['other']['title'],
                    'uid' => $this->relateduserid,
                    'groupanduser' => $this->data['other']['groupanduser'],
                    'group' => $this->data['other']['group']
                ));
        } else if (!empty($this->other['prettyview'])) {
            return new \moodle_url('/mod/wiki/prettyview.php', array('pageid' => $this->objectid));
        } else {
            return new \moodle_url('/mod/wiki/view.php', array('pageid' => $this->objectid));
        }
    }
1137363
public function currentUrl()
    {
        $context = $this->contextObject();

        if ($context && isset($context['url'])) {
            return $this->createAbsoluteUrl($context['url']);
        }

        return null;
    }
908867
public function GetBaseUrl () {
		if ($this->baseUrl === NULL) 
			$this->baseUrl = $this->GetDomainUrl() . $this->GetBasePath();
		return $this->baseUrl;
	}
983600
protected function getCurrentUrl()
    {
        $schema = ((!empty($this->server['HTTPS']) && $this->server['HTTPS'] !== 'off') || (!empty($this->server['SERVER_PORT']) && $this->server['SERVER_PORT'] == 443)) ? 'https://' : 'http://';

        $host = isset($this->server['HTTP_HOST']) ? $this->server['HTTP_HOST'] : 'localhost';

        return $schema.$host.$this->server['REQUEST_URI'];
    }
193153
public function getURL()
    {
        $p = $this->recall('page');

        // If there is a login page, no need to return to it
        if ($p == 'login') {
            return $this->app->url('/');
        }

        $url = $this->app->url($p, $this->recall('args', null));
        $this->forget('page');
        $this->forget('args');

        return $url;
    }
1168528
public function getUrl()
    {
        // Ensure in request cycle (even for override).
        if ($this->request === null) {
            return null;
        }

        // Ensure request has been matched
        if (!$this->request->attributes->get('_route')) {
            return null;
        }

        if ($this->override) {
            $this->resolveCurrentOverride();

            return (string) $this->override;
        }

        return $this->urlGenerator->generate(
            $this->request->attributes->get('_route'),
            $this->request->attributes->get('_route_params'),
            UrlGeneratorInterface::ABSOLUTE_URL
        );
    }
861418
public function getUrl()
    {
        if ($this->idcat < 0) return false;     
        $url = '/'.$this->_alias;             
        if ( $this->getCatalog()->isServer() ) return $url;                   
        return rtrim($this->getCatalog()->getUrl(),'/').$url;
    }
100063
public function getUrlAttribute()
    {
        if ($this->disk == 'public') {
            return url($this->storage->url($this->path));
        }

        return config('media.download', false) ? url(str_finish(config('media.download'), '/') . $this->id) : null;
    }