The laravel 4 documentation mentions unique field validation. They explain here how to include where clauses to the unique validation. A single WHERE clause for the unique table for example:
$validator = Validator::make(
array(
'name' => 'John Doe'
),
array(
'name' => 'unique:table,field,NULL,id,field1,value1'
)
);
Now i assume this does something like:
"SELECT id FROM table WHERE field = 'John Doe' AND field1 = value1 LIMIT 1"
Then check's if this query returns a result and if not passes the validator.
So i was wondering if there was a way to add more where clauses? And if so how?