From 036a0bab0bd05cf2f8086363c35adc104a7cf631 Mon Sep 17 00:00:00 2001 From: "dr.dimitru" <ceo@veliov.com> Date: Tue, 16 Apr 2013 03:28:55 +0400 Subject: [PATCH 1/3] Make view with response status and headers Add functionality to make view with response status and headers - view_with_status --- laravel/response.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/laravel/response.php b/laravel/response.php index f3508358778..242deab04ec 100644 --- a/laravel/response.php +++ b/laravel/response.php @@ -57,6 +57,28 @@ public static function make($content, $status = 200, $headers = array()) { return new static($content, $status, $headers); } + + /** + * Create a new response instance with status code. + * + * <code> + * // Create a response instance with a view + * return Response::view('home.no_such_page', 404); + * + * // Create a response instance with a view and data + * return Response::view('item.no_such_page', 404, array('message' => 'Nothing found'), array('header' => 'value')); + * </code> + * + * @param string $view + * @param int $status + * @param array $data + * @param array $headers + * @return Response + */ + public static function view_with_status($view, $status, $data = array(), $headers = array()) + { + return new static(View::make($view, $data), $status, $headers); + } /** * Create a new response instance containing a view. From 357875d6c8b7ab291b2e91aab7ca688cc7cff933 Mon Sep 17 00:00:00 2001 From: "Dmitriy A. Golev" <ceo@veliov.com> Date: Wed, 22 May 2013 01:44:32 +0400 Subject: [PATCH 2/3] Validation in Russian update --- application/language/ru/validation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/language/ru/validation.php b/application/language/ru/validation.php index 8fd15f5c9d8..10f6a57e614 100644 --- a/application/language/ru/validation.php +++ b/application/language/ru/validation.php @@ -32,10 +32,10 @@ "string" => "Поле :attribute должно быть от :min до :max символов.", ), "confirmed" => "Поле :attribute не совпадает с подтверждением.", - "count" => "The :attribute must have exactly :count selected elements.", - "countbetween" => "The :attribute must have between :min and :max selected elements.", - "countmax" => "The :attribute must have less than :max selected elements.", - "countmin" => "The :attribute must have at least :min selected elements.", + "count" => "Поле :attribute должно совпадать с :count выбранными элементами.", + "countbetween" => "Поле :attribute должно быть между :min и :max выбранными элементами.", + "countmax" => "Поле :attribute долюно быть менее :max выбранных элементов.", + "countmin" => "Поле :attribute должно иметь как минимум :min выбранных элементов.", "different" => "Поля :attribute и :other должны различаться.", "email" => "Поле :attribute имеет неверный формат.", "exists" => "Выбранное значение для :attribute уже существует.", From 70f283606068845710f62b24dee944ee82bdbf47 Mon Sep 17 00:00:00 2001 From: "Dmitriy A. Golev" <ceo@veliov.com> Date: Wed, 22 May 2013 01:47:48 +0400 Subject: [PATCH 3/3] Revert "Make view with response status and headers" This reverts commit 036a0bab0bd05cf2f8086363c35adc104a7cf631. --- laravel/response.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/laravel/response.php b/laravel/response.php index 242deab04ec..f3508358778 100644 --- a/laravel/response.php +++ b/laravel/response.php @@ -57,28 +57,6 @@ public static function make($content, $status = 200, $headers = array()) { return new static($content, $status, $headers); } - - /** - * Create a new response instance with status code. - * - * <code> - * // Create a response instance with a view - * return Response::view('home.no_such_page', 404); - * - * // Create a response instance with a view and data - * return Response::view('item.no_such_page', 404, array('message' => 'Nothing found'), array('header' => 'value')); - * </code> - * - * @param string $view - * @param int $status - * @param array $data - * @param array $headers - * @return Response - */ - public static function view_with_status($view, $status, $data = array(), $headers = array()) - { - return new static(View::make($view, $data), $status, $headers); - } /** * Create a new response instance containing a view.