PHP code example of linshunwei / danhar-im

1. Go to this page and download the library: Download linshunwei/danhar-im library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

linshunwei / danhar-im example snippets


'providers' => [
    //...
    Linshunwei\DanharIm\DanharImServiceProvider::class,
    //...
],

    'host' => env('DANHAR_IM_HOST', '127.0.0.1'),
    'app_id' => env('DANHAR_IM_APP_ID', ''),
    'app_secret' => env('DANHAR_IM_APP_SECRET', ''),

use Linshunwei\DanharIm\DanharIm;

    $im = new DanharIm();
    $res = $im->msgList();
shell
php artisan vendor:publish --provider="Linshunwei\DanharIm\DanharImServiceProvider"