title: Showing an error of Undefined index: password
body: <p>I my session controller i code for the verify email ,login and changepassword but getting an error </p>
  
  <blockquote>
    <p>ErrorException in EloquentUserProvider.php line 116:
    Undefined index: password. </p>
  </blockquote>
  
  <p>and getting the error from line code </p>
  
  <pre><code>if (!Auth::attempt($credentials_verifiy))
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;?php
  namespace App\Http\Controllers;
  
  use Request;
  use Response;
  //----models--------
  use App\Site;
  use App\Jobs;
  
  
  use Auth;
  use DB;
  use Validator;
  use Redirect;
  
  //use Illuminate\Support\Facades\Validator;
  use Illuminate\Support\MessageBag;
  class SessionController extends Controller {
  
      public function index(){
          return Redirect::to('login')-&gt;with('alert-success', 'test awrnning message.');
      }
      public function store()
      {
               $input = Request::only('username', 'email', 'password');
               $credentials = [
                   'username' =&gt; Request::get('username'),
                   'password' =&gt; Request::get('password')
               ];
  
              if (!Auth::attempt($credentials))
              {
                  return Redirect::back()-&gt;with('alert-danger', 'Username or password do not match.');
              }
              else
              {
                  $credentials_verifiy = [
                      'verified_email' =&gt; '1'
                  ];
                  if (!Auth::attempt($credentials_verifiy))
                  {
                      return Redirect::back()-&gt;with('alert-danger', 'Please verify your email.');
                  }
                  else
                  {
                      if(Auth::user()-&gt;last_login_at=='' || Auth::user()-&gt;last_login_at==null)
                      {
                          return redirect('/change_password');
                      }
                      else
                      {
                          return redirect('/tests');
                      }
                  }
              }
      }
  }
  </code></pre>