1. Go to this page and download the library: Download fengyikang88/fykeasychat 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/ */
fengyikang88 / fykeasychat example snippets
use FykEasyChat\WechatQrcode;
/**
* Generate Mini Program QR Code
*/
public function QrCode()
{
$config =[
'app_id' => '',// 小程序app_id
'secret' => '', //小程序app_secret
];
$mod = new WechatQrcode($config);
$base64_image = $mod->miniCircularImg('pages/index/index?qrcode=helloworld');
return $base64_image;
}