title: How to change default auth password and username in laravel 5.5.28
body: <p>I am using the auto generated auth setup for logging in and registering etc. I've got the register working but haven't been able to get the log in to work.</p>
  
  <p>By default when I run it I get this error</p>
  
  <pre><code>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'email' in 'where clause' (SQL: select * from `consumers` where `email` = jermayne21@gmail.com limit 1)
  </code></pre>
  
  <p>Which is understandable, my email column in my db is <code>con_email</code> and my password column is <code>con_password</code></p>
  
  <p>I updated my <code>LoginController.php</code> to change the <code>email</code> and <code>password</code> attributes to the columns noted above.</p>
  
  <p><strong>LoginController.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Auth;
  
  use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use Illuminate\Foundation\Auth\AuthenticatesUsers;
  use App\User;
  
  class LoginController extends Controller
  {
      use AuthenticatesUsers;
  
      /**
       * Where to redirect users after login.
       *
       * @var string
       */
      protected $redirectTo = '/home';
  
      /**
       * Create a new controller instance.
       *
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware('guest')-&gt;except('logout');
      }
      public function username()
      {
        return 'con_email';
      }
  
      public function getAuthPassword()
      {
        return $this-&gt;con_password;
      }
  }
  </code></pre>
  
  <p><strong>User.php (for reference)</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Notifications\Notifiable;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class User extends Authenticatable
  {
      use Notifiable;
      protected $table = 'consumers';
      protected $primaryKey = 'con_id';
  
  
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [ 'con_id', 'con_fname', 'con_lname', 'con_email', 'con_password', 'total_earned'];
  
      /**
       * The attributes that should be hidden for arrays.
       *
       * @var array
       */
      protected $hidden = [
          'con_password', 'remember_token',
      ];
  
  }
  </code></pre>
  
  <p><strong>login.blade.php (which I thought I didn't need to change please correct me if I'm wrong)</strong></p>
  
  <pre><code>@extends('layouts.app')
  
  @section('content')
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-8 col-md-offset-2"&gt;
              &lt;div class="panel panel-default"&gt;
                  &lt;div class="panel-heading"&gt;Login&lt;/div&gt;
  
                  &lt;div class="panel-body"&gt;
                      &lt;form class="form-horizontal" method="POST" action="{{ route('login') }}"&gt;
                          {{ csrf_field() }}
  
                          &lt;div class="form-group{{ $errors-&gt;has('email') ? ' has-error' : '' }}"&gt;
                              &lt;label for="email" class="col-md-4 control-label"&gt;E-Mail Address&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus&gt;
  
                                  @if ($errors-&gt;has('email'))
                                      &lt;span class="help-block"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('email') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group{{ $errors-&gt;has('password') ? ' has-error' : '' }}"&gt;
                              &lt;label for="password" class="col-md-4 control-label"&gt;Password&lt;/label&gt;
  
                              &lt;div class="col-md-6"&gt;
                                  &lt;input id="password" type="password" class="form-control" name="password" required&gt;
  
                                  @if ($errors-&gt;has('password'))
                                      &lt;span class="help-block"&gt;
                                          &lt;strong&gt;{{ $errors-&gt;first('password') }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @endif
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;div class="col-md-6 col-md-offset-4"&gt;
                                  &lt;div class="checkbox"&gt;
                                      &lt;label&gt;
                                          &lt;input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}&gt; Remember Me
                                      &lt;/label&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="form-group"&gt;
                              &lt;div class="col-md-8 col-md-offset-4"&gt;
                                  &lt;button type="submit" class="btn btn-primary"&gt;
                                      Login
                                  &lt;/button&gt;
  
                                  &lt;a class="btn btn-link" href="{{ route('password.request') }}"&gt;
                                      Forgot Your Password?
                                  &lt;/a&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  </code></pre>
  
  <p>Once making the changes from the default code I no longer get an error. when I sign in it just reloads to the login screen without any validation errors (but seems as if it was almost a wrong info BUT it isn't the wrong login info.</p>
  
  <p><strong>questions I have pertaining to other answers for similar problems I've found</strong>
  I don't have an <code>AuthController.php</code> but I have read many answers that state to override it in that file. when I ran <code>php artisan make:auth</code> it auto generated <code>LoginController.php</code>, <code>ForgotPasswordController.php</code>, <code>RegisterController.php</code>and <code>ResetPasswordController.php</code> Is this a recent update in laravel 5.5 (or maybe was done in 5.2 from what I read). I get the same current error in all my Controllers so I thought maybe <code>AuthController.php</code> was changed to the 4 separate controllers above. </p>