Ouzo\Routing\GroupedRoute::post PHP Method

post() public static method

public static post ( $uri, $action, array $options = [] )
$options array
    public static function post($uri, $action, array $options = array())
    {
        Route::post(self::uri($uri), self::action($action), $options);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldAddPostRoute()
 {
     //given
     GroupedRoute::post('/user/save', 'User#save');
     GroupedRoute::post('/user/update/id/:id', 'User#update');
     //when
     $routes = Route::getRoutes();
     //then
     Assert::thatArray($routes)->onMethod('getUri')->containsOnly('/api/user/save', '/api/user/update/id/:id');
 }
All Usage Examples Of Ouzo\Routing\GroupedRoute::post