PHPackages                             nookery/laravel-huawei-cloud-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nookery/laravel-huawei-cloud-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nookery/laravel-huawei-cloud-client
===================================

华为云组件，适用于Laravel框架

1.0.7(5y ago)45.3k↓70%MITPHPPHP ^5.5 || ^7.0CI failing

Since Jun 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nookery/laravel-huawei-cloud-client)[ Packagist](https://packagist.org/packages/nookery/laravel-huawei-cloud-client)[ Docs](https://github.com/nookery/huawei-cloud)[ RSS](/packages/nookery-laravel-huawei-cloud-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

Huawei Cloud Client for Laravel
===============================

[](#huawei-cloud-client-for-laravel)

[![Build Status](https://camo.githubusercontent.com/cb6b1e07979389238194bee4ba50d8c1615943698c433af9060e1aa53ac2c00c/68747470733a2f2f7472617669732d63692e6f72672f6e6f6f6b6572792f6c61726176656c2d6875617765692d636c6f75642d636c69656e742e737667)](https://travis-ci.org/nookery/laravel-huawei-cloud-client)[![Total Downloads](https://camo.githubusercontent.com/01ba3eb6ce735b845c70792733eb0b20bd4650a45cf6bbb484a21074aebf07f0/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6f6b6572792f6c61726176656c2d6875617765692d636c6f75642d636c69656e742f642f746f74616c2e737667)](https://packagist.org/packages/nookery/laravel-huawei-cloud-client)[![Latest Stable Version](https://camo.githubusercontent.com/c65fe0cc1f430567f856876315f5ee04d0086addc5ee8a4c6f798f3c7cc4b4a5/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6f6b6572792f6c61726176656c2d6875617765692d636c6f75642d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/nookery/laravel-huawei-cloud-client)[![License](https://camo.githubusercontent.com/97be3af296b70ec07585af7e7f0c09034798af5bc8d6716ce42ddd537965e14f/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6f6b6572792f6c61726176656c2d6875617765692d636c6f75642d636c69656e742f6c6963656e73652e737667)](https://packagist.org/packages/nookery/laravel-huawei-cloud-client)

简介
--

[](#简介)

适用于Laravel的华为云伙伴API的客户端。

本组件是对 [华为云伙伴API](https://support.huaweicloud.com/api-bpconsole/zh-cn_topic_0075200705.html) 的封装，请在已阅读华为云相关文档的前提下使用。

版本与兼容
-----

[](#版本与兼容)

Laravel本软件5.4.0 &lt; Laravel &lt; 6.0.01.x.x安装
--

[](#安装)

```
composer require nookery/laravel-huawei-cloud-client

# 若Laravel版本 < 5.5（5.5以下版本不支持扩展包发现），需在config/app.php文件中providers中增加：
\HuaweiCloud\Provider::class,

php artisan config:clear
php artisan vendor:publish --provider="HuaweiCloud\Provider"

```

检查是否正确生成了`config/huawei.php`文件，并在`config/huawei.php`文件中配置您的账号和密码。

使用
--

[](#使用)

- 输出格式

    以下function的输出都是这个实例：`HuaweiCloud\Contracts\Response`
- 查询当前账号下的客户

```
    \HuaweiCloud\Facades\HuaweiCloud::customers();
```

- 创建客户账号

```
    /**
     * 创建用户
     *
     * @param string $accountId 伙伴销售平台的用户唯一标识，该标识的具体值由伙伴分配
     * @param string $userName 客户的华为云账号名
     * @param string $cooperationType 模式，1是推荐模式，0是垫付模式，默认是垫付模式
     * @return mixed
     * @throws GuzzleException
     * @throws HuaweiCloudException
     */
    \HuaweiCloud\Facades\HuaweiCloud::createCustomer($accountId = '', $userName = '', $cooperationType = '0');
```

- 为用户设置折扣

```
    /**
     * 给用户设置折扣
     *
     * @param string $customerId 客户ID
     * @param int $discount 折扣
     * @param \Carbon\Carbon $expiresAt 失效时间，默认2年后，或传递一个Canbon实例
     * @return mixed
     * @throws GuzzleException
     * @throws HuaweiCloudException
     */
    \HuaweiCloud\Facades\HuaweiCloud::setDiscount($customerId = '', $discount = 1, \Carbon\Carbon $expiresAt = null);
```

其他说明
----

[](#其他说明)

本软件使用到了Laravel的缓存（`Illuminate\Support\Facades\Cache`）来存储华为云的Token，缓存驱动请不要配置成`array`，驱动是`array`时仅对单次请求有效。

License
-------

[](#license)

This software is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

8

Last Release

2158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8b651bdfde4ff171b0e1ba8c15f62ef567c37160175ec16aa2e6f2276770d56?d=identicon)[nookery](/maintainers/nookery)

---

Top Contributors

[![nookery](https://avatars.githubusercontent.com/u/5194193?v=4)](https://github.com/nookery "nookery (27 commits)")

### Embed Badge

![Health badge](/badges/nookery-laravel-huawei-cloud-client/health.svg)

```
[![Health](https://phpackages.com/badges/nookery-laravel-huawei-cloud-client/health.svg)](https://phpackages.com/packages/nookery-laravel-huawei-cloud-client)
```

###  Alternatives

[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[bubbstore/correios

Biblioteca que faz cálculo de frete, rastreamento de objetos e consulta de CEP diretamente do Webservice dos Correios.

2589.0k](/packages/bubbstore-correios)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
