jeudi 30 mars 2017

Laravel Auth::attempt always return false?

Here is myscreen shot of database and my login input enter image description here

public function action(Request $request){
         $username = $request->username;
         $pass = bcrypt($request->password);
         $credentials = [
                         'id' => $username,
                         'password' => $pass
                        ];

    dd(Auth::attempt($credentials));
         if (Auth::attempt(['id' => $username, 'password' => $pass])) {
            echo 'Ok';
         }else{
            echo 'Not ok';
         }

I'm trying to make a login action using laravel auth::attemptbut it always return false.



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

Aucun commentaire:

Enregistrer un commentaire