qiansion/think-easywechat

v1.0.4 2023-03-15 03:03 UTC

This package is auto-updated.

Last update: 2024-04-15 05:23:32 UTC


README

📦 一个 PHP 微信开发 SDK,微擎旗下开源产品。

因项目中之前使用了EasyWeChat5.X,版本升级相当复杂,所以才去克隆一个的笨方法。

环境需求

安装

composer require qiansion/think-easywechat

使用示例

基本使用(以公众号服务端为例):

<?php

use QianSionEasyWeChat\OfficialAccount\Application;

$config = [
    'app_id' => 'wx3cf0f39249eb0exxx',
    'secret' => 'f1c242f4f28f735d4687abb469072xxx',
    'aes_key' => 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG',
    'token' => 'easywechat',
];

$app = new Application($config);

$app->getServer()->with(fn() => "您好!EasyWeChat!");

$response = $server->serve();

文档和链接

官网 · 讨论 · 更新策略

感谢

非常感谢 EasyWeChat 如此优秀的开源项目

License

MIT