cleaning up validator method.
This commit is contained in:
parent
e1c8928550
commit
75280a9fea
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue