LaravelPackages.net
Acme Inc.
Toggle sidebar
hachi-zzq/laravel-wechat-third-work

企业号第三方SDK for Laravel

492
0
v1.0.6
About hachi-zzq/laravel-wechat-third-work

hachi-zzq/laravel-wechat-third-work is a Laravel package for 企业号第三方sdk for laravel. It currently has 0 GitHub stars and 492 downloads on Packagist (latest version v1.0.6). Install it with composer require hachi-zzq/laravel-wechat-third-work. Discover more Laravel packages by hachi-zzq or browse all Laravel packages to compare alternatives.

Last updated

企业号第三方授权 SDK for Laravel

author:zhuzhengqian[email protected]

使用示例

<?php
    use hachi\LaravelWechatThirdWork\Application;

//配置
   $config = [
        'corp_id' => 'corp_id',
        'agent_id' => 'agent_id', // 如果有 agend_id 则填写
        // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
        'response_type' => 'collection',
        'permanent_code'=>'permanent_code',
        'suite_id'=>'suite_id',//套件ID
        'suite_secret'=>'suite_secret',//套件的secret
        'suite_ticket'=>'suite_ticket',//套件的ticket
        'provider_secret'=>'provider_secret',//单点登录、注册定制化 等需要用的 provider_secret
        'log' => [
            'level' => 'debug',
            'file'  => storage_path('logs/wechat.log'),
        ],
    ];

    $wechatThirdWork = Application::make($config);
    
    //使用
    
    //getSuiteAccessToken
    $wechatThirdWork->open_platform->getSuiteAccessToken();
    
    //getToken by permanenttCode
    $wechatThirdWork->open_platform->getCorpAccessTokenByPermanentCode();

Star History Chart