tinfot/laravel-wechat-jssdk

1.0.0 2018-03-08 09:34 UTC

This package is not auto-updated.

Last update: 2024-11-05 12:42:24 UTC


README

License

Installation

Require this package in your composer.json and update composer.

composer require tinfot/laravel-wechat-jssdk:dev-master

In Laravel 5.5 or higher, this package will be automatically discovered and you can safely skip the following two steps.

If using Laravel 5.4 or lower, after updating composer, add the ServiceProvider to the providers array in config/app.php

Tinfot\Wechat\WechatServiceProvider::class,

You can use the facade for shorter code; if using Laravel 5.3 or lower, add this to your aliases:

'JSSDK' => Tinfot\Wechat\Facades\JSSDK::class,

Usage

$model = new \Tinfot\Wechat(config('wechat.app_id'), config('wechat.app_secret'), $request->input('url'));
$model->setSignPackage();
return $model->getSignPackage();

Support

Support only through Github. Please don't mail us about issues, make a Github issue instead.