public function getUrl($url)
    {
        if (!$url || starts_with($url, ['#', '//', 'mailto:', 'tel:', 'http'])) {
            return $url;
        }

        // Get URL root
        $root = $this->app->getSetting('url');

        $url = trim($root, '/') . '/' . trim($url, '/');

        // Force trailing slash
        if ($this->app->getSetting('url_trailing_slash', false)
            && ! strrchr(basename($url), '.')
        ) {
            $url = "{$url}/";
        }

        return $url;
    }
public function getUrl($url)
    {
        if (!$url || starts_with($url, ['#', '//', 'mailto:', 'tel:', 'http'])) {
            return $url;
        }

        // Get URL root
        $root = $this->app->getSetting('url');

        $url = trim($root, '/') . '/' . trim($url, '/');

        // Force trailing slash
        if ($this->app->getSetting('url_trailing_slash', false)
            && ! strrchr(basename($url), '.')
        ) {
            $url = "{$url}/";
        }

        return $url;
    }
public function getUrl ( $ url ) { if ( ! $ url || starts_with ( $ url , [ '#' , '//' , 'mailto:' , 'tel:' , 'http' ] ) ) { return $ url ; } // Get URL root $ root = $ this -> app -> getSetting ( 'url' ) ; $ url = trim ( $ root , '/' ) . '/' . trim ( $ url , '/' ) ; // Force trailing slash if ( $ this -> app -> getSetting ( 'url_trailing_slash' , false ) && ! strrchr ( basename ( $ url ) , '.' ) ) { $ url = "{$url}/" ; } return $ url ; }
Get the URL for the given page.

@param  string $url
@return string
Get the URL for the given page .