Scalr\Api\Rest\Application::put PHP Method

put() public method

Adds put route
public put ( 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
    public function put($path, $options, $requirements = [])
    {
        return $this->addRoute($path, $options, $requirements)->setMethods([Request::METHOD_PUT]);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function testPut()
 {
     $route = $this->app->put('/path', function () {
         /* do nothing */
     });
     $this->assertEquals([Request::METHOD_PUT], $route->getMethods());
 }
All Usage Examples Of Scalr\Api\Rest\Application::put