src/Active.php
public function checkRoutePattern($patterns)
    {
        if (!$this->route) {
            return false;
        }

        $routeName = $this->route->getName();

        if ($routeName == null) {
            return in_array(null, $patterns);
        }

        foreach ((array)$patterns as $p) {
            if (str_is($p, $routeName)) {
                return true;
            }
        }

        return false;
    }
public function checkRoutePattern($patterns)
    {
        if (!$this->route) {
            return false;
        }

        $routeName = $this->route->getName();

        if ($routeName == null) {
            return in_array(null, $patterns);
        }

        foreach ((array)$patterns as $p) {
            if (str_is($p, $routeName)) {
                return true;
            }
        }

        return false;
    }
public function checkRoutePattern ( $ patterns ) { if ( ! $ this -> route ) { return false ; } $ routeName = $ this -> route -> getName ( ) ; if ( $ routeName == null ) { return in_array ( null , $ patterns ) ; } foreach ( ( array ) $ patterns as $ p ) { if ( str_is ( $ p , $ routeName ) ) { return true ; } } return false ; }
Check the current route name with one or some patterns

@param array|string $patterns

@return bool
Check the current route name with one or some patterns