public static function allowMethod($method) { $method = strtoupper($method); if (in_array($method, static::$allowedMethods)) { return; } static::$allowedMethods[] = $method; }
public function testCanSpecifyAdditionalMethodTypesToRespondTo() { Route::allowMethod(__FUNCTION__); $map = $this->app->map('/:controller', 'bogus-callback'); $map->via(__FUNCTION__); $this->assertTrue($map->respondsTo(__FUNCTION__)); }