Adds patch route
public patch ( string $path, array | callable $options, array $requirements = [] ) : Scalr\Api\Rest\Routing\Route | ||
$path | string | The path pattern of the route |
$options | array | callable | The options |
$requirements | array | optional The requirements |
Результат | Scalr\Api\Rest\Routing\Route | Returns route instance |
/** * @test */ public function testPatch() { $route = $this->app->patch('/path', function () { /* do nothing */ }); $this->assertEquals([Request::METHOD_PATCH], $route->getMethods()); }
/** * {@inheritdoc} * @see Application::patch() */ public function patch($path, $options, $requirements = []) { return parent::patch($path, $options, $requirements)->addMethod(Request::METHOD_OPTIONS); }