public function is(string $pattern): bool
    {
        $path = $this->path();
        $prefix = $this->prefix();

        foreach (\func_get_args() as $pattern) {
            $pattern = ($pattern === '*' ? "{$prefix}*" : "{$prefix}/{$pattern}");
            $pattern = \trim($pattern, '/');

            empty($pattern) && $pattern = '/';

            if (Str::is($pattern, $path)) {
                return true;
            }
        }

        return false;
    }
public function is(string $pattern): bool
    {
        $path = $this->path();
        $prefix = $this->prefix();

        foreach (\func_get_args() as $pattern) {
            $pattern = ($pattern === '*' ? "{$prefix}*" : "{$prefix}/{$pattern}");
            $pattern = \trim($pattern, '/');

            empty($pattern) && $pattern = '/';

            if (Str::is($pattern, $path)) {
                return true;
            }
        }

        return false;
    }
public function is ( string $ pattern ) : bool { $ path = $ this -> path ( ) ; $ prefix = $ this -> prefix ( ) ; foreach ( \ func_get_args ( ) as $ pattern ) { $ pattern = ( $ pattern === '*' ? "{$prefix}*" : "{$prefix}/{$pattern}" ) ; $ pattern = \ trim ( $ pattern , '/' ) ; empty ( $ pattern ) && $ pattern = '/' ; if ( Str :: is ( $ pattern , $ path ) ) { return true ; } } return false ; }
Determine if the current request URI matches a pattern.

@param  string  $pattern

@return bool
Determine if the current request URI matches a pattern .