PHP code example of jncinet / qihucms-invite

1. Go to this page and download the library: Download jncinet/qihucms-invite 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/ */

    

jncinet / qihucms-invite example snippets


route('api.invite.my')
请求:GET
地址:/invite/my
返回值:
{
    'user_id' => 会员ID号,
    'parent' => {师父信息},
    'grandfather' => {师祖信息},
    'son_count' => 徒弟数,
    'grandson_count' => 徒孙数,
}


route('api.invite.td')
请求:GET
地址:/invite/td
参数:
int $limit (选填)显示条数
返回值:
{
    data: [
        {
            user_id: 用户ID号
            user:{会员信息}
        },
        ...
    ],
    links:{},
    meta:{}
}

route('api.invite.ts')
请求:GET
地址:/invite/ts
参数:
int $limit (选填)显示条数
返回值:
{
    data: [
        {
            user_id: 用户ID号
            user:{会员信息}
        },
        ...
    ],
    links:{},
    meta:{}
}

// 创建推荐关系
Qihucms\Invite\Events\Invited
shell
$ php artisan migrate
shell
$ php artisan vendor:publish --provider="Qihucms\Invite\InviteServiceProvider"