PHP code example of weiwait / dcat-wechat-config
1. Go to this page and download the library: Download weiwait/dcat-wechat-config 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/ */
weiwait / dcat-wechat-config example snippets
public function index(Content $content): Content
{
$tab = Tab::make();
$tab->add('微信小程序', new \Weiwait\WECHAT\Forms\WechatAppletConfig());
return $content->title('配置')
->body($tab->withCard());
}
// 调用
\Weiwait\Wechat\Application::applet()->auth->session($code);
\Weiwait\Wechat\Application::pay();