Looking to hire Laravel developers? Try LaraJobs

laravel-wechat-jssdk maintained by richardtianke

Description
Laravel Wechat JS-SDK
Author
Last update
2018/03/09 08:24 (dev-master)
License
Downloads
16

Comments
comments powered by Disqus

Laravel Wechat JSSDK for Laravel 5


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.