The problem with the names. Auth@attempt accepts all these credentials except the password (case-sensitive), which you pass in this array and launches the where query (this way you can add additional restrictions for the attempt, since they are only conditions). If he finds a model, he will perform a hash check on the password credentials (case sensitive) that you passed, and the model hashes the password that he receives from $model->getAuthPassword() .
This field in the credentials is special, because this is what Auth requires so that it knows which field in the credentials means the password. It does not correlate directly with the field that you used in the users table, and should have the name password in the credential array. Other fields in the credentials that you submit, in addition to the "password", directly correlate with the fields in the users table, since they are conditions for querying the database in this table.
You must declare a user in your model if you use a password field other than the password in the table. In your case, you use the "Password". (it all depends on the case)
class User .... { ... public function getAuthPassword() { return $this->Password;
When transferring credentials, you pass the plaintext password, as hash_check will happen, not a direct comparison.
You can name the fields you ever want on your actual table, you just need to do Eloquent about it.
source share