From 75280a9fea7343e0782aa2af1974b3154920e40e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 Feb 2012 16:53:08 -0600 Subject: [PATCH] cleaning up validator method. --- laravel/validator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/laravel/validator.php b/laravel/validator.php index 6e38c055..1be15934 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -459,7 +459,10 @@ protected function validate_unique($attribute, $value, $parameters) // We allow the table column to be specified just in case the column does // not have the same name as the attribute. It must be within the second // parameter position, right after the database table name. - if (isset($parameters[1])) $attribute = $parameters[1]; + if (isset($parameters[1])) + { + $attribute = $parameters[1]; + } $query = $this->db()->table($parameters[0])->where($attribute, '=', $value);