protected function matchRequest(array $match, Request $request) : bool
    {
        if (!$request->is(trim($match['path'], '/'))) {
            return false;
        }

        $method = collect($match['method'])->filter()->map(function ($method) {
            return strtoupper($method);
        });

        return $method->isEmpty() || $method->contains($request->method());
    }
protected function matchRequest(array $match, Request $request) : bool
    {
        if (!$request->is(trim($match['path'], '/'))) {
            return false;
        }

        $method = collect($match['method'])->filter()->map(function ($method) {
            return strtoupper($method);
        });

        return $method->isEmpty() || $method->contains($request->method());
    }
protected function matchRequest ( array $ match , Request $ request ) : bool { if ( ! $ request -> is ( trim ( $ match [ 'path' ] , '/' ) ) ) { return false ; } $ method = collect ( $ match [ 'method' ] ) -> filter ( ) -> map ( function ( $ method ) { return strtoupper ( $ method ) ; } ) ; return $ method -> isEmpty ( ) || $ method -> contains ( $ request -> method ( ) ) ; }
If a request match the specific HTTP method and path.

@param array   $match
@param Request $request

@return bool
If a request match the specific HTTP method and path .