I have a form with two fields ( username, password ) and a mysql table with two identical fields (username, password) and I authentication system:
But I cannot make it work if my table fields have different names, for example: ( my_user, my_pass ).
If you just changed the username field to another, this also works for me, which creates problems, this is the password field.
My auth.php configuration
'driver' => 'eloquent'
Update
An already found solution in my controller, the password name cannot be changed.
Before (WRONG): What I did in the first place was wrong.
$userdata = array( 'my_user' => Input::get('my_user'), 'my_pass' => Input::get('my_pass') );
he should be
$userdata = array( 'my_user' => Input::get('my_user'), 'password' => Input::get('my_pass') );
source share