options() public method

Adds options route
public options ( 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
return Scalr\Api\Rest\Routing\Route Returns route instance
Example #1
0
 /**
  * @test
  */
 public function testOptions()
 {
     $route = $this->app->options('/path', function () {
         /* do nothing */
     });
     $this->assertEquals([Request::METHOD_OPTIONS], $route->getMethods());
 }