@@ -26,8 +26,8 @@ |
||
| 26 | 26 | { |
| 27 | 27 | // Whenever the validator factory is accessed in the container, we set |
| 28 | 28 | // the custom resolver on it (this works in Larvel >= 5.2 as well). |
| 29 | - $this->app->resolving('validator', function ($factory, $app) { |
|
| 30 | - $factory->resolver(function ($translator, $data, $rules, $messages, $customAttributes = []) { |
|
| 29 | + $this->app->resolving('validator', function($factory, $app) { |
|
| 30 | + $factory->resolver(function($translator, $data, $rules, $messages, $customAttributes = []) { |
|
| 31 | 31 | return new ValidatorExtension( |
| 32 | 32 | $translator, |
| 33 | 33 | $data, |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function __construct($translator, $data, $rules, $messages, array $customAttributes = array()) |
| 11 | 11 | { |
| 12 | 12 | // Set custom validation error messages |
| 13 | - if(!isset($messages['unique_with'])) |
|
| 13 | + if (!isset($messages['unique_with'])) |
|
| 14 | 14 | { |
| 15 | 15 | $messages['unique_with'] = $translator->get( |
| 16 | 16 | 'uniquewith-validator::validation.unique_with' |
@@ -67,8 +67,7 @@ discard block |
||
| 67 | 67 | if (count($parameter) > 1) |
| 68 | 68 | { |
| 69 | 69 | $column_name = $parameter[1]; |
| 70 | - } |
|
| 71 | - else |
|
| 70 | + } else |
|
| 72 | 71 | { |
| 73 | 72 | $column_name = $field_name; |
| 74 | 73 | } |
@@ -78,8 +77,7 @@ discard block |
||
| 78 | 77 | if ($field_name == $column) |
| 79 | 78 | { |
| 80 | 79 | $column = $column_name; |
| 81 | - } |
|
| 82 | - else |
|
| 80 | + } else |
|
| 83 | 81 | { |
| 84 | 82 | $extra[$column_name] = array_get($this->data, $field_name); |
| 85 | 83 | } |