Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $input = $request->json()->all();
- $user = JWTAuth::toUser($input['token']);
- if($user != null){
- $input['password'] = bcrypt($input['password']);
- $user->password = $input['password'];
- if($user->save()){
- //dd($user->password);
- return response()->json(['result' => true]);
- }else{
- return response()->json(['message' => 'Errore aggiornamento password'], 409);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement