In the documentation, I saw that you can establish a connection for a unique rule that is excellent. However, the creature does not seem to adhere to the same logic. Take this for example:
$rules = [
'username' => 'required|max:40|unique:user',
'name' => 'sometimes|required',
'email' => 'required|email|max:255|unique:int.user',
'password' => 'sometimes|required|confirmed|min:6',
'password_current' => 'sometimes|required'
];
In this case, the unique rule is GREAT. It uses my database connection "int" and calls the user table. HOWEVER, when the rules change like this:
$rules['email'] = 'required|email|max:255|exists:int.user';
I got this error:
SQLSTATE [42S02]: base table or view not found: 1146 The table 'int.user' does not exist (SQL: select count (*) as a collection from int.user, where email = haleybuggs6@gmail.com )
It tries to call the int.user table instead of using the int database connection.
, , ? .