postLogin() override in laravel 5 giving undefined index error

2k Views Asked by At

In my user table , coumns name for email is user_email and password is user_pass

I would like to override postLogin() method inside AuthController to be able to authenticate the users

Here is what i tried

 public function postLogin(\Illuminate\Http\Request $request)
{
        $this->validate($request, ['user_email' => 'required|email', 'user_pass' => 'required']);

        $credentials = $request->only('user_email', 'user_pass');


     if ($this->auth->attempt($credentials, $request->has('remember')))
        {
            return redirect()->intended($this->redirectPath());
        }
}

This throws ErrorException in EloquentUserProvider.php line 111: Undefined index: password

But I'm not passing password index at all !! from my login form the name of input is user_email and user_pass

Any Clue

0

There are 0 best solutions below