src/Webpage/Traits/MustHaveCanonical.php
public function getCanonicalAttribute()
    {
        if ($canonical = $this->canonicalUrl) {
            return $canonical;
        }

        if (method_exists($this, 'baseCanonical')) {
            return $this->baseCanonical();
        }

        return url()->current();
    }
public function getCanonicalAttribute()
    {
        if ($canonical = $this->canonicalUrl) {
            return $canonical;
        }

        if (method_exists($this, 'baseCanonical')) {
            return $this->baseCanonical();
        }

        return url()->current();
    }
public function getCanonicalAttribute ( ) { if ( $ canonical = $ this -> canonicalUrl ) { return $ canonical ; } if ( method_exists ( $ this , 'baseCanonical' ) ) { return $ this -> baseCanonical ( ) ; } return url ( ) -> current ( ) ; }
Return the canonical URL to be rendered in the browser

@return string
Return the canonical URL to be rendered in the browser