PHPackages                             aliyuncs/aliyun-oss-php-sdk-laravel - 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. aliyuncs/aliyun-oss-php-sdk-laravel

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

aliyuncs/aliyun-oss-php-sdk-laravel
===================================

A simple Laravel 5 and lumen service provider for including the Oss PHP SDK for PHP.

v1.2.0(8y ago)7935.4k↓68.8%7[2 PRs](https://github.com/aliyun/aliyun-oss-php-sdk-laravel/pulls)2MITPHPPHP &gt;=5.5.9CI failing

Since Jul 21Pushed 5y ago8 watchersCompare

[ Source](https://github.com/aliyun/aliyun-oss-php-sdk-laravel)[ Packagist](https://packagist.org/packages/aliyuncs/aliyun-oss-php-sdk-laravel)[ Docs](https://github.com/aliyun)[ RSS](/packages/aliyuncs-aliyun-oss-php-sdk-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (2)

AliCloud OSS Service Provider for Laravel 5
===========================================

[](#alicloud-oss-service-provider-for-laravel-5)

[![Build Status](https://camo.githubusercontent.com/763301b46030ec3a60d8ff48b23254176404dd820cafcc5fa2f4ff157caa3ac0/68747470733a2f2f7472617669732d63692e6f72672f616c6979756e2f616c6979756e2d6f73732d7068702d73646b2d6c61726176656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aliyun/aliyun-oss-php-sdk-laravel)[![Coverage Status](https://camo.githubusercontent.com/a005535798a6fd8631af2e2c83bc99acf36d6917038d0d6d887e918a2e25c335/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c6979756e2f616c6979756e2d6f73732d7068702d73646b2d6c61726176656c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/aliyun/aliyun-oss-php-sdk-laravel?branch=master)

[README of Chinese](https://github.com/aliyun/aliyun-oss-php-sdk-laravel/blob/master/README-CN.md)
--------------------------------------------------------------------------------------------------

[](#readme-of-chinese)

Make a Reference in Your Laravel Project
----------------------------------------

[](#make-a-reference-in-your-laravel-project)

- Install the Laravel framework or the Lumen framework.
- Create a Laravel or Lumen project, depending on the framework you have installed.
- In the composer.json file of the new project, insert the following code:

    ```
    {
        "require": {
            "aliyuncs/aliyun-oss-php-sdk-laravel": "~1.2.0"
        }
    }

    ```
- Run the following command: `composer update`

For the Laravel Project
-----------------------

[](#for-the-laravel-project)

- Edit the vendor/aliyun-oss/aliyun-oss-php-sdk-laravel/config/config.php file as follows:

    ```
    return [
        'id' => 'your id',
        'key' => 'your key',
        'endpoint' => 'your endpoint',
        'bucket' => 'your bucket'
    ];

    ```
- Edit the config/app.php file and register OSS Service Provider:

    ```
    'providers' => array(
        // ...
        AliyunOss\Laravel\AliyunOssServiceProvider::class,
    )

    ```
- Edit the config/app.php file to insert an aliases segment.

    ```
    'aliases' => array(
        // ...
        'OSS' => AliyunOss\Laravel\AliyunOssFacade::class,
    )

    ```
- Edit the routes/web.php file as follows:

    ```
    Route::get('/', function()
    {
        $client = App::make('aliyun-oss');
        $client->putObject("your bucket", "your object", "content you want to upload");
        $result = $client->getObject("your bucket", "your boject");
        echo $result;
    });

    ```

For the Lumen Project
---------------------

[](#for-the-lumen-project)

- Edit the vendor/aliyun-oss/aliyun-oss-php-sdk-laravel/config/config.php file as follows:

    ```
    return [
        'id' => 'your id',
        'key' => 'your key',
        'endpoint' => 'your endpoint',
        'bucket' => 'your bucket'
    ];

    ```
- Edit the bootstrap/app.php file and register OSS Service Providers:

    ```
    $app->register(AliyunOss\Laravel\AliyunOssServiceProvider::class);

    ```
- Edit the routes/web.php file as follows:

    ```
    $app->get('/', function () use ($app) {
        $client = $app->make('aliyun-oss');
        $client->putObject('your bucket', 'your key',  "content you want to upload");
        $result = $client->getObject("your bucket", "your boject");
        echo $result;
    });

    ```

Run the Test Case
-----------------

[](#run-the-test-case)

- Set the following environment variables:

```
export OSS_ENDPOINT=''
export OSS_ACCESS_KEY_ID=''
export OSS_ACCESS_KEY_SECRET=''
export OSS_BUCKET=''

```

- Switch to the project directory and run the following command: `php vendor/bin/phpunit`

License
-------

[](#license)

- [MIT](https://github.com/aliyun/aliyun-oss-php-sdk-laravel/blob/master/LICENSE.md)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 78.6% 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 ~6 days

Total

3

Last Release

3205d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/185a06d51e30f1a0132ecc83f514895b0bb9bf7d261bdf4235e66c51b1ce614e?d=identicon)[hefei19861](/maintainers/hefei19861)

---

Top Contributors

[![RobertYue19900425](https://avatars.githubusercontent.com/u/16470908?v=4)](https://github.com/RobertYue19900425 "RobertYue19900425 (11 commits)")[![baiyubin2020](https://avatars.githubusercontent.com/u/75470723?v=4)](https://github.com/baiyubin2020 "baiyubin2020 (3 commits)")

---

Tags

laravelossphpsdklumenlaravel 5aliyunossalicloud

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aliyuncs-aliyun-oss-php-sdk-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/aliyuncs-aliyun-oss-php-sdk-laravel/health.svg)](https://phpackages.com/packages/aliyuncs-aliyun-oss-php-sdk-laravel)
```

###  Alternatives

[scottybo/laravel-facebook-sdk

Fully unit tested Facebook SDK v5 integration for Laravel 7.x

2225.0k](/packages/scottybo-laravel-facebook-sdk)

PHPackages © 2026

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