jeudi 28 juillet 2016

Login is Not Working Laravel 5

Hello friends I am using users table column like (USERNAME,EMAIL,PASSWORD) if i am changing to column name as small letters is working fine. To Change column name as caps is not working give me any suggestion

This is my controller

  public function postLogin(Request $request)
   {
     $this->validate($request, array('username' => 'required', 'password' => 'required'));
    $credentials = $request->only('USERNAME', 'PASSWORD');

    if (Auth::validate($credentials)) 
    {
        $user = Auth::getLastAttempted();
        Auth::login($user, $request->has('remember'));
        return redirect()->intended($this->redirectPath());
    }
    return redirect($this->loginPath())
    ->withInput($request->only('USERNAME', 'remember'))
    ->withErrors([
        'username' => $this->getFailedLoginMessage(),
    ]);

}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire