From 318bb360723aafa57feed87147d3f921a720ed59 Mon Sep 17 00:00:00 2001 From: Jesse O'Brien Date: Fri, 22 Mar 2013 17:04:15 -0300 Subject: [PATCH 1/2] Adding PATCH to the route register. Self-explanatory. --- laravel/routing/route.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/laravel/routing/route.php b/laravel/routing/route.php index 1ce17f1a..f2deba74 100644 --- a/laravel/routing/route.php +++ b/laravel/routing/route.php @@ -330,6 +330,18 @@ public static function put($route, $action) Router::register('PUT', $route, $action); } + /** + * Register a PATCH route with the router. + * + * @param string|array $route + * @param mixed $action + * @return void + */ + public static function patch($route, $action) + { + Router::register('PATCH', $route, $action); + } + /** * Register a DELETE route with the router. * From 53a14206b1e5248a34b3d4ce4c90988c97d254ac Mon Sep 17 00:00:00 2001 From: bruston Date: Wed, 27 Mar 2013 13:07:48 +0000 Subject: [PATCH 2/2] Minor correction to controllers documentation. Signed-off-by: bruston --- laravel/documentation/controllers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/documentation/controllers.md b/laravel/documentation/controllers.md index 7bece18b..11621c8f 100644 --- a/laravel/documentation/controllers.md +++ b/laravel/documentation/controllers.md @@ -98,7 +98,7 @@ #### Attaching a filter to all except a few actions: $this->filter('before', 'auth')->except(array('add', 'posts')); -Much like the previous example, this declaration ensures that the auth filter is run on only some of this controller's actions. Instead of declaring to which actions the filter applies we are instead declaring the actions that will not require authenticated sessions. It can sometimes be safer to use the 'except' method as it's possible to add new actions to this controller and to forget to add them to only(). This could potentially lead your controller's action being unintentionally accessible by users who haven't been authenticated. +Much like the previous example, this declaration ensures that the auth filter is run on only some of this controller's actions. Instead of declaring to which actions the filter applies we are instead declaring the actions that will not require authenticated sessions. It can sometimes be safer to use the 'except' method as it's possible to add new actions to this controller and to forget to add them to only(). This could potentially lead to your controller's action being unintentionally accessible by users who haven't been authenticated. #### Attaching a filter to run on POST: