validated(); if (! $this->resetPasswordAttemptService->resetPassword( $data['email'], $data['codigo'], $data['password'], )) { throw ValidationException::withMessages([ 'codigo' => __('api.auth.password_reset_invalid'), ]); } return response()->json([ 'code' => 'auth.password_updated', 'message' => __('api.auth.password_updated'), 'status' => ResetPasswordAttempt::STATUS_USED, ]); } }