protected function currentUrlMatches()
    {
        if ($this->url() == Request::url()) { // If URLs are equal, always return true
            return true;
        }

        if ($this->activeUrlPattern) { // If pattern was set, see if it matches
            $pattern = ltrim(preg_replace('/\/\*/', '(/.*)?', $this->activeUrlPattern), '/');
            return preg_match("@^{$pattern}\z@", Request::path());
        }

        return false; // No match
    }
protected function currentUrlMatches()
    {
        if ($this->url() == Request::url()) { // If URLs are equal, always return true
            return true;
        }

        if ($this->activeUrlPattern) { // If pattern was set, see if it matches
            $pattern = ltrim(preg_replace('/\/\*/', '(/.*)?', $this->activeUrlPattern), '/');
            return preg_match("@^{$pattern}\z@", Request::path());
        }

        return false; // No match
    }
protected function currentUrlMatches ( ) { if ( $ this -> url ( ) == Request :: url ( ) ) { // If URLs are equal, always return true return true ; } if ( $ this -> activeUrlPattern ) { // If pattern was set, see if it matches $ pattern = ltrim ( preg_replace ( '/\/\*/' , '(/.*)?' , $ this -> activeUrlPattern ) , '/' ) ; return preg_match ( "@^{$pattern}\z@" , Request :: path ( ) ) ; } return false ; // No match }
Returns whether the current URL matches this link's URL

@return bool
Returns whether the current URL matches this link s URL