PHP code example of lzw / zto

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

    

lzw / zto example snippets



$zto = new ZentaoToOther();
$zto->zentaoSdk()->get('departments'); //Http::post/get



$zto = new ZentaoToOther();
$app_token = config('zto.feishu.app_token');
$table_id = $zto->feishuSdk()->getDataTableId(); // 数据表id
$zto->feishuSdk()->post("open-apis/bitable/v1/apps/{$app_token}/tables/{$table_id}/records"); //Http::post/get/put



$zto = new ZentaoToOther();
$zto->createFeishuTable();
// 返回的数据表id 默认存入缓存中,需手动填写入env或config中以防数据丢失


Route::post('/hook', function (Request $request) {
    $zto = new ZentaoToOther();
    Log::info($request->all());
    $zto->zentaoHook($request->all());
    return 'success';
});

bash

// 安装
composer vendor:publish --provider="Lzw\ZentaoToOther\ZentaoToOtherProvider"