From f1feb467f13c12294c381348abb6e3cbd89358bd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 23 Apr 2012 13:33:48 -0500 Subject: [PATCH] added Input::merge method. --- laravel/documentation/changes.md | 1 + laravel/input.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/laravel/documentation/changes.md b/laravel/documentation/changes.md index 169fe0ac..e1ef96ed 100644 --- a/laravel/documentation/changes.md +++ b/laravel/documentation/changes.md @@ -54,6 +54,7 @@ - Allow multiple views to be registered for a single composer. - Added `Request::set_env` method. - `Schema::drop` now accepts `$connection` as second parameter. +- Added `Input::merge` method. ## Upgrading From 3.1 diff --git a/laravel/input.php b/laravel/input.php index 863732d7..f935ddaf 100644 --- a/laravel/input.php +++ b/laravel/input.php @@ -228,4 +228,15 @@ class Input { Session::flash(Input::old_input, array()); } + /** + * Merge new input into the current request's input array. + * + * @param array $input + * @return void + */ + public static function merge(array $input) + { + Request::foundation()->request->replace($input); + } + } \ No newline at end of file