public function withMiddleware(string $middlewareClassName, array $middlewareProperties = []): self
    {
        $this->middlewareBindings[] = new MiddlewareBinding($middlewareClassName, $middlewareProperties);

        return $this;
    }
public function withMiddleware(string $middlewareClassName, array $middlewareProperties = []): self
    {
        $this->middlewareBindings[] = new MiddlewareBinding($middlewareClassName, $middlewareProperties);

        return $this;
    }
public function withMiddleware ( string $ middlewareClassName , array $ middlewareProperties = [ ] ) : self { $ this -> middlewareBindings [ ] = new MiddlewareBinding ( $ middlewareClassName , $ middlewareProperties ) ; return $ this ; }
Binds a single middleware class to the route

@param string $middlewareClassName The name of the middleware class to bind
@param array $middlewareProperties Any properties this method relies on
@return self For chaining
Binds a single middleware class to the route