aobozhang/rongcloud-facades

used RongCloud as laravel facades

0.1.0 2016-02-16 09:00 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:19:31 UTC


README

used rongcloud as Normal laravel facades

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

  • First:
composer require aobozhang/rongcloud-facades '@dev'   //get latest dev version
composer require aobozhang/rongcloud-facades          //get stable version

  • Second:

Modify "config\app.php"

<?php

    return = [

        ...,

        'providers' = [

            ...,

            Aobo\RongCloud\RongCloudServiceProvider::class,

        ],
    ];
  • Third:
php artisan vendor:publish

Usage

use RongCloud;

//...

$res = RongCloud::getToken($id,$name,$portraitUri);

var_dump($res);

To Use Your Own Configuration

Modify ".env" -- recommend

RONGCLOUD_APP_KEY=YourAppKey
RONGCLOUD_APP_SECRET=YourAppSecret

Or You Can Modify "config\rongcloud.php" -- The Same effect.

return [
    'AppKey'      => env('RONGCLOUD_APP_KEY', 'your appKey'),
    'AppSecret'      => env('RONGCLOUD_APP_SECRET', 'your appSecret')
];