Browse Source

Merge pull request #1586 from Pasvaz/patch-1

Implemented OPTIONS verb
Taylor Otwell 12 years ago
parent
commit
252990455e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      laravel/routing/router.php

+ 4 - 2
laravel/routing/router.php

@@ -33,6 +33,7 @@ class Router {
 		'DELETE' => array(),
 		'PATCH'  => array(),
 		'HEAD'   => array(),
+		'OPTIONS'=> array(),
 	);
 
 	/**
@@ -47,6 +48,7 @@ class Router {
 		'DELETE' => array(),
 		'PATCH'  => array(),
 		'HEAD'   => array(),
+		'OPTIONS'=> array(),
 	);
 
 	/**
@@ -97,7 +99,7 @@ class Router {
 	 *
 	 * @var array
 	 */
-	public static $methods = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD');
+	public static $methods = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS');
 
 	/**
 	 * Register a HTTPS route with the router.
@@ -594,4 +596,4 @@ class Router {
 		return implode('/', array_fill(0, $times, $pattern));
 	}
 
-}
+}