mercredi 1 novembre 2017

Why laravel password not match?

I'm trying to login but always fail.

this how i store my password

'password' => bcrypt($data['password']),

In laravel LoginController .

public function customchecker()
    {
        $credentials = [
          'username'        => Input::get('username'),
          'password'        => bcrypt(Input::get('password'))
        ];

         if (Auth()->attempt($credentials)) {
              return Redirect::to('home')->with('alert-success', 'You are now logged in.'); 

          }else{

            $errors = ['username' => ['Email and/or password invalid.']]; 

            return Redirect::back()->withErrors($errors)->withInput(Input::except('password')); 
          }

    }

i test with this

$credentials = [
          'username'        => Input::get('username'),
          'password'        => Input::get('password')
        ];

still not working, How can i fix this ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2z6g8JK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire