I have a form and getting input values. One of the input field is email. I need to check that email is unique in two different table but need to allow the value itself in both table. Tried almost all combinations, but couldn't sort it out.
$rules = [
'email' => "required|unique:admins|unique:vendors,email,$id",
];
The code above works but gives warning that Email has already been taken. But when I use one table only it works as expected. Maybe someone could help me with that, would be highly appreciated.