used Neteaseim as Normal laravel facades
- 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
use Neteaseim;
...
$param = [
'accid' => 'test-accid-'.str_random(32),
'name' => 'test-name-'.str_random(32)
];
var_dump(Neteaseim::user_create($param));
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')
];