PHP code example of vinlon / laravel-wechat-auth
1. Go to this page and download the library: Download vinlon/laravel-wechat-auth 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/ */
vinlon / laravel-wechat-auth example snippets
shell script
php artisan vendor:publish --provider="Vinlon\Laravel\WechatAuth\WechatAuthServiceProvider"
php artisan migrate
php artisan jwt:secret
Route::group(['middleware' => ['auth:wxapp']], function () {
//这里放置你的需要登录的 api 路由
});