aobozhang/neteaseim-laravel

used neteaseim as laravel facades

0.12 2016-05-20 08:47 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:29:09 UTC


README

used Neteaseim as Normal laravel facades

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

  • First:
composer require aobozhang/neteaseim-laravel
  • Second:

Modify "config\app.php"

<?php

    return = [

        ...,

        'providers' = [

            ...,

            Aobo\Neteaseim\NimServiceProvider::class,

        ],
    ];
  • Third:

type follow in console:

php artisan vendor:publish

Till now, you can use it

Usage

use Neteaseim;

...

$param = [
    'accid' => 'test-accid-'.str_random(32),
    'name'  => 'test-name-'.str_random(32)
];

var_dump(Neteaseim::user_create($param));

To Use Your Own Configuration

Modify ".env" -- recommend

NETEASEIM_APPKEY=your key
NETEASEIM_APPSECRET=your secret

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

return [
    'appkey'      => env('NETEASEIM_APPKEY', 'your key'),
    'appsecret'   => env('NETEASEIM_APPSECRET', 'your secret')
];