Skip to content

Canonical url: current url vs full url #149

@ver4rs

Description

@ver4rs

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions