Package Data | |
---|---|
Maintainer Username: | 865826021 |
Maintainer Contact: | 865826021@qq.com (yu xiao yang) |
Package Create Date: | 2017-04-18 |
Package Last Update: | 2017-04-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-09 15:17:02 |
Package Statistics | |
---|---|
Total Downloads: | 11 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
composer require yuxiaoyang/getwxopenid
或者在你的 composer.json
的 require 部分中添加:
"yuxiaoyang/getwxopenid": "~1.0"
下载完毕之后,直接配置 config/app.php
的 providers
:
//Illuminate\Hashing\HashServiceProvider::class,
Yuxiaoyang\GetwxOpenid\GetwxOpenidProvider::class,
控制器中使用 WxpayController.php
:
<?php
use \Yuxiaoyang\GetwxOpenid\GetwxOpenid;
class WxpayController extends Controller
{
public $getwxopenid;
//获取JSAPI openid
public function getopenid()
{
//创建示例对象
$this->getwxopenid = new GetwxOpenid();
$data = $this->getwxopenid->getOpenid();
return $data;
}
}