PHP code example of jncinet / qihucms-ucenter

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


\Qihucms\UCenter\Jobs\UpdateAccount::dispatch([
                    'unionid' => isset($account['openid']['wechat']['unionid']) ? $account['openid']['wechat']['unionid'] : '',
                    'user_id' => $user_id,
                    'amount' => $jewel,
                    'info' => __('account.trigger_event.value')[$trigger_event],
                    'type' => 'jewel'
                ]);

\Qihucms\UCenter\Jobs\UpdateAccount::dispatch([
                    'unionid' => isset($account['openid']['wechat']['unionid']) ? $account['openid']['wechat']['unionid'] : '',
                    'user_id' => $user_id,
                    'amount' => $integral,
                    'info' => __('account.trigger_event.value')[$trigger_event],
                    'type' => 'integral'
                ]);

\Qihucms\UCenter\Jobs\UpdateAccount::dispatch([
                    'unionid' => isset($account['openid']['wechat']['unionid']) ? $account['openid']['wechat']['unionid'] : '',
                    'user_id' => $user_id,
                    'amount' => $balance,
                    'info' => __('account.trigger_event.value')[$trigger_event],
                    'type' => 'balance``'
                ]);