protected function hasMiddleware(string $key, string $group = null): bool
    {
        return $this->getMiddlewareGroup($group ?: $this->middlewareGroupId)->has($key);
    }
protected function hasMiddleware(string $key, string $group = null): bool
    {
        return $this->getMiddlewareGroup($group ?: $this->middlewareGroupId)->has($key);
    }
protected function hasMiddleware ( string $ key , string $ group = null ) : bool { return $ this -> getMiddlewareGroup ( $ group ? : $ this -> middlewareGroupId ) -> has ( $ key ) ; }
Determine if the instance has a given middleware.

@param string $key
@param string|null $group
@return bool
Determine if the instance has a given middleware .