There was an error while loading. Please reload this page.
Note: We need 2 API forgot password & change password
Get Token by email as the following:
# App\Http\Controllers\AuthController public function postForgotPassword(Request $request) { $email = $request->email; $status = $this->service->postForgotPassword($email, function ($token, $user) { // Use send mail from framework sendEmail($user, $token); }); return response()->json([ 'ok' => $status, 'type' => 'forgotPassword', ]); }
Change new password
# App\Http\Controllers\AuthController public function changePassword(Request $request) { $params = $request->only(['old_password', 'password', 'token']); $status = $this->service->changePassword($params, function ($user, $attr) { // show user }); return response()->json([ 'ok' => $status, 'type' => 'changePassword', ]); }