Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical url: current url vs full url #149

Open
ver4rs opened this issue Jul 3, 2019 · 0 comments
Open

Canonical url: current url vs full url #149

ver4rs opened this issue Jul 3, 2019 · 0 comments

Comments

@ver4rs
Copy link

ver4rs commented Jul 3, 2019

Hi.
I found this. On config file you have comment ...set null for URL::current() //is without query string

'canonical' => false, // Set null for using Url::current(), set false to total remove

On Fasade class SEOMeta.class you have methon getCanonical() check link

return $this->canonical ?: (($canonical_config === null) ? app('url')->full() : $canonical_config);

Inside this method you have when is null use app('url')->full(); // url full is with query string

\Laravel documentation URL: https://laravel.com/docs/5.8/urls
copied code

// Get the current URL without the query string...
echo url()->current();

// Get the current URL including the query string...
echo url()->full();

// Get the full URL for the previous request...
echo url()->previous();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant