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

delete() public method

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

Usage Example

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