From 9dd0a21f8d051635516d4e31aba2299e9efb98e7 Mon Sep 17 00:00:00 2001 From: Pasvaz Date: Sat, 12 Jan 2013 02:20:37 +0100 Subject: [PATCH] Implemented OPTIONS verb Laravel crashes when an OPTIONS request is issued --- laravel/routing/router.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/laravel/routing/router.php b/laravel/routing/router.php index b2578169f..36e6b7119 100644 --- a/laravel/routing/router.php +++ b/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)); } -} \ No newline at end of file +}