PHP code example of chenhua / laravel5-online-kefu

1. Go to this page and download the library: Download chenhua/laravel5-online-kefu 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/ */

    

chenhua / laravel5-online-kefu example snippets


Chenhua\OnlineKefu\OnlineKefuServiceProvider::class,


return [
    'default' => [
        'qq'     => [
            'number' => '276004561',  //qq号码
            'text'   => '在线客服'  //说明文字
        ],
        'tel'    => [  //可自由编辑内容
            'text1' => '售前咨询热线',
            'number1'  => '150-9087-8950',
            'text2' => '售后咨询热线',
            'number2'  => '138-6131-2481',
        ],
        'weixin' => [
            'qr-code' => PHP_SAPI === 'cli' ? false : url('plugin/kefu/img/weixin-ma.jpg'),  //可修改为外网地址
            'text' => '微信扫一扫<br>咨询微信客服'
        ]
    ],
    'simple'  => [
        'qq'     => [
            'number' => '276004561',  //qq号码
            'text'   => '在线客服'  //说明文字
        ],
        'weixin' => [
            'qr-code' => PHP_SAPI === 'cli' ? false : url('plugin/kefu/img/weixin-ma.jpg'),  //可修改为外网地址
            'text' => '微信扫一扫<br>咨询微信客服'
        ]
    ],
];
bash
php artisan vendor:publish --tag=kefu