Webiny\Component\Router\Route\RouteCollection::setMethods PHP Method

setMethods() public method

Sets the method filter to all routes within the collection.
public setMethods ( array | string $methods )
$methods array | string Url method. Example: POST | GET
    public function setMethods($methods)
    {
        /**
         * @var Route $route
         */
        foreach ($this->routes as $route) {
            $route->setMethods($methods);
        }
    }