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;
    }