mardi 31 octobre 2017

Keep getting 401 unauthorized 'invalid credentials' Laravel Passport

I have generated some demo user through seeders. I can login those user by oauth/token. But when i create new user i cant login anymore. It always giving me 401 unauthorized 'invalid credentials'. I have done all research. I am testing through POSTMAN I am totally clueless. this is my register method:

$user = new User;
$user->name = ucfirst($request['name']);
$user->email = $request['email'];
$user->password = bcrypt($request['password']);
$user->save();
return response()->json('success'); 

Pls help me !!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire