aobozhang/easemob-facades

used Easemob as laravel facades

1.0.5 2016-01-01 14:25 UTC

This package is not auto-updated.

Last update: 2024-11-21 00:53:45 UTC


README

used Easemob as Normal laravel facades

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

  • First:
composer require aobozhang/easemob-facades
  • Second:

Modify "config\app.php"

<?php

    return = [

        ...,

        'providers' = [

            ...,

            Aobo\Easemob\EasemobServiceProvider::class,

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

Till now, you can use it
Test Account Supply by http://github/easemob/

Usage

use Easemob;

...

$options = [
    'username' => 'test_username',
    'password' => 'test_password'
];

return Easemob::accreditRegister($options);

To Use Your Own Configuration

Modify ".env" -- recommend

EASEMOB_ORG_NAME=YourOrgName
EASEMOB_APP_NAME=YourAppName
EASEMOB_CLIENT_ID=YourClientID
EASEMOB_CLIENT_SECRET=YourClientSecret

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

return [
    'org_name'      => env('EASEMOB_ORG_NAME', 'easemob-playground'),
    'app_name'      => env('EASEMOB_APP_NAME', 'test1'),
    'client_id'     => env('EASEMOB_CLIENT_ID', 'YXA6wDs-MARqEeSO0VcBzaqg5A'),
    'client_secret' => env('EASEMOB_CLIENT_SECRET', 'YXA6JOMWlLap_YbI_ucz77j-4-mI0JA'),
];